Revision fc15b997 include/Host.h

View differences:

include/Host.h
20 20
#include "PoolSQL.h"
21 21
#include "HostShare.h"
22 22
#include "HostTemplate.h"
23
#include "ClusterPool.h"
23 24

  
24 25
using namespace std;
25 26

  
......
90 91

  
91 92
        if ( state != DISABLED) //Don't change the state is host is disabled
92 93
        {
93
        	if (success == true)
94
        	{
95
        		state = MONITORED;
96
        	}
97
        	else
98
        	{
99
        		state = ERROR;
100
        	}
94
            if (success == true)
95
            {
96
                state = MONITORED;
97
            }
98
            else
99
            {
100
                state = ERROR;
101
            }
101 102
        }
102 103
    };
103 104

  
......
107 108
     */
108 109
    void disable()
109 110
    {
110
    	state = DISABLED;
111
        state = DISABLED;
111 112
    };
112 113

  
113 114
    /**
......
116 117
     */
117 118
    void enable()
118 119
    {
119
    	state = INIT;
120
        state = INIT;
120 121
    };
121 122

  
122 123
    /**
123 124
     *  Returns host host_name
124 125
     *     @return host_name Host's hostname
125 126
     */
126
 	const string& get_hostname() const
127
    const string& get_hostname() const
127 128
    {
128
	    return hostname;
129
	};
129
        return hostname;
130
    };
130 131

  
131 132
    /** Update host counters and update the whole host on the DB
132 133
     *    @param parse_str string with values to be parsed
......
188 189
        return last_monitored;
189 190
    };
190 191

  
191
    int set_cluster(string cluster_name)
192
    /**
193
     *  Sets the cluster for this host
194
     *    @return time_t last monitored time
195
     */
196
    int set_cluster(const string& cluster_name)
192 197
    {
193 198
        cluster = cluster_name;
194 199
        return 0;

Also available in: Unified diff