ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/src/conf.C
(Generate patch)

Comparing gvpe/src/conf.C (file contents):
Revision 1.49 by pcg, Sun Aug 10 22:18:58 2008 UTC vs.
Revision 1.51 by pcg, Sat Jul 18 05:59:16 2009 UTC

145void configuration::init () 145void configuration::init ()
146{ 146{
147 memset (this, 0, sizeof (*this)); 147 memset (this, 0, sizeof (*this));
148 148
149 mtu = DEFAULT_MTU; 149 mtu = DEFAULT_MTU;
150 nfmark = 0;
150 rekey = DEFAULT_REKEY; 151 rekey = DEFAULT_REKEY;
151 keepalive = DEFAULT_KEEPALIVE; 152 keepalive = DEFAULT_KEEPALIVE;
152 llevel = L_INFO; 153 llevel = L_INFO;
153 ip_proto = IPPROTO_GRE; 154 ip_proto = IPPROTO_GRE;
154#if ENABLE_ICMP 155#if ENABLE_ICMP
184 if (rsa_key) 185 if (rsa_key)
185 RSA_free (rsa_key); 186 RSA_free (rsa_key);
186 187
187 rsa_key = 0; 188 rsa_key = 0;
188 189
189 free (pidfilename); pidfilename = 0; 190 free (pidfilename); pidfilename = 0;
190 free (ifname); ifname = 0; 191 free (ifname); ifname = 0;
191#if ENABLE_HTTP_PROXY 192#if ENABLE_HTTP_PROXY
192 free (proxy_host); proxy_host = 0; 193 free (proxy_host); proxy_host = 0;
193 free (proxy_auth); proxy_auth = 0; 194 free (proxy_auth); proxy_auth = 0;
194#endif 195#endif
195#if ENABLE_DNS 196#if ENABLE_DNS
196 free (dns_forw_host); dns_forw_host = 0; 197 free (dns_forw_host); dns_forw_host = 0;
197#endif 198#endif
199 free (script_if_up); script_if_up = 0;
200 free (script_node_up); script_node_up = 0;
201 free (script_node_change); script_node_change = 0;
202 free (script_node_down); script_node_down = 0;
198} 203}
199 204
200void 205void
201configuration::clear () 206configuration::clear ()
202{ 207{
330 conf.rekey = atoi (val); 335 conf.rekey = atoi (val);
331 else if (!strcmp (var, "keepalive")) 336 else if (!strcmp (var, "keepalive"))
332 conf.keepalive = atoi (val); 337 conf.keepalive = atoi (val);
333 else if (!strcmp (var, "mtu")) 338 else if (!strcmp (var, "mtu"))
334 conf.mtu = atoi (val); 339 conf.mtu = atoi (val);
340 else if (!strcmp (var, "nfmark"))
341 conf.nfmark = atoi (val);
335 else if (!strcmp (var, "if-up")) 342 else if (!strcmp (var, "if-up"))
336 free (conf.script_if_up), conf.script_if_up = strdup (val); 343 free (conf.script_if_up), conf.script_if_up = strdup (val);
337 else if (!strcmp (var, "node-up")) 344 else if (!strcmp (var, "node-up"))
338 free (conf.script_node_up), conf.script_node_up = strdup (val); 345 free (conf.script_node_up), conf.script_node_up = strdup (val);
346 else if (!strcmp (var, "node-change"))
347 free (conf.script_node_change), conf.script_node_change = strdup (val);
339 else if (!strcmp (var, "node-down")) 348 else if (!strcmp (var, "node-down"))
340 free (conf.script_node_down), conf.script_node_down = strdup (val); 349 free (conf.script_node_down), conf.script_node_down = strdup (val);
341 else if (!strcmp (var, "pid-file")) 350 else if (!strcmp (var, "pid-file"))
342 free (conf.pidfilename), conf.pidfilename = strdup (val); 351 free (conf.pidfilename), conf.pidfilename = strdup (val);
343 else if (!strcmp (var, "dns-forw-host")) 352 else if (!strcmp (var, "dns-forw-host"))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines