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

Comparing gvpe/src/sockinfo.C (file contents):
Revision 1.15 by pcg, Thu Mar 3 16:54:34 2005 UTC vs.
Revision 1.17 by pcg, Mon Mar 7 01:31:26 2005 UTC

62 62
63void 63void
64sockinfo::set (const conf_node *conf, u8 prot_) 64sockinfo::set (const conf_node *conf, u8 prot_)
65{ 65{
66 if (prot_ == PROT_DNSv4) 66 if (prot_ == PROT_DNSv4)
67 set (conf->dns_hostname, conf->dns_hostname ? conf->dns_port : 0, prot_); 67 {
68 host = 0x01010101; port = htons (conf->id); prot = prot_;
69 }
68 else 70 else
69 set (conf->hostname, 71 set (conf->hostname,
70 prot_ == PROT_UDPv4 ? conf->udp_port 72 prot_ == PROT_UDPv4 ? conf->udp_port
71 : prot_ == PROT_TCPv4 ? conf->tcp_port 73 : prot_ == PROT_TCPv4 ? conf->tcp_port
72 : prot_ == PROT_DNSv4 ? conf->dns_port 74 : prot_ == PROT_DNSv4 ? conf->dns_port
169 { 171 {
170 prot = prot_; 172 prot = prot_;
171 port = htons (conf->tcp_port); 173 port = htons (conf->tcp_port);
172 return true; 174 return true;
173 } 175 }
174
175#if ENABLE_DNS
176 if (conf
177 && prot_ & PROT_DNSv4
178 && conf->protocols & PROT_DNSv4
179 && conf->dns_port)
180 {
181 set (::conf.dns_forw_host, ::conf.dns_forw_port, prot_);
182 return true;
183 }
184#endif
185 } 176 }
186 177
187 return false; 178 return false;
188} 179}
189 180

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines