Revision ebc810f4 include/ZoneServer.h

View differences:

include/ZoneServer.h
34 34

  
35 35
    int init(string& error)
36 36
    {
37
        if ( vector_value("NAME").empty() )
38
        {
39
            error = "Missing NAME in SERVER";
40
            return -1;
41
        }
42

  
43
        if ( vector_value("ENDPOINT").empty() )
44
        {
45
            error = "Missing ENDPOINT in SERVER";
46
            return -1;
47
        }
48

  
37 49
        return 0;
38 50
    }
39 51

  
......
147 159
            return -1;
148 160
        }
149 161

  
162
        va->replace(SERVER_ID_NAME, next_id);
163

  
150 164
        add_attribute(server, next_id);
151 165

  
152 166
        next_id += 1;
......
154 168
        return 0;
155 169
    };
156 170

  
157

  
158 171
protected:
159

  
160 172
    ExtendedAttribute * attribute_factory(VectorAttribute * va, int id) const
161 173
    {
162 174
        return new ZoneServer(va, id);
163 175
    };
164 176

  
165 177
private:
178
    friend class Zone;
166 179

  
167 180
    static const char * SERVER_NAME; //"SERVER"
168 181

  

Also available in: Unified diff