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.8 by pcg, Wed Apr 2 03:25:17 2003 UTC vs.
Revision 1.11 by pcg, Wed Apr 2 21:43:44 2003 UTC

53 53
54struct configuration conf; 54struct configuration conf;
55 55
56u8 best_protocol (u8 protset) 56u8 best_protocol (u8 protset)
57{ 57{
58 if (protset & PROT_IPv4) 58 if (protset & PROT_IPv4 ) return PROT_IPv4;
59 return PROT_IPv4; 59 if (protset & PROT_UDPv4) return PROT_UDPv4;
60 if (protset & PROT_TCPv4) return PROT_TCPv4;
60 61
61 return PROT_UDPv4; 62 return 0;
62} 63}
63 64
64const char *strprotocol (u8 protocol) 65const char *strprotocol (u8 protocol)
65{ 66{
66 if (protocol & PROT_IPv4 ) return "rawip"; 67 if (protocol & PROT_IPv4 ) return "rawip";
67 if (protocol & PROT_UDPv4) return "udp"; 68 if (protocol & PROT_UDPv4) return "udp";
69 if (protocol & PROT_TCPv4) return "tcp";
68 70
69 return "<unknown>"; 71 return "<unknown>";
70} 72}
71 73
72configuration::configuration () 74configuration::configuration ()
311 parse_bool (node->compress, "compress", true, false); 313 parse_bool (node->compress, "compress", true, false);
312 } 314 }
313 // all these bool options really really cost a lot of executable size! 315 // all these bool options really really cost a lot of executable size!
314 else if (!strcmp (var, "enable-tcp")) 316 else if (!strcmp (var, "enable-tcp"))
315 { 317 {
318#if ENABLE_TCP
316 u8 v; parse_bool (v, "enable-tcp" , PROT_TCPv4, 0); node->protocols = (node->protocols & ~PROT_TCPv4) | v; 319 u8 v; parse_bool (v, "enable-tcp" , PROT_TCPv4, 0); node->protocols = (node->protocols & ~PROT_TCPv4) | v;
320#endif
317 } 321 }
318 else if (!strcmp (var, "enable-udp")) 322 else if (!strcmp (var, "enable-udp"))
319 { 323 {
320 u8 v; parse_bool (v, "enable-udp" , PROT_UDPv4, 0); node->protocols = (node->protocols & ~PROT_UDPv4) | v; 324 u8 v; parse_bool (v, "enable-udp" , PROT_UDPv4, 0); node->protocols = (node->protocols & ~PROT_UDPv4) | v;
321 } 325 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines