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.10 by pcg, Thu Oct 16 02:41:21 2003 UTC vs.
Revision 1.12 by pcg, Fri Apr 2 14:42:45 2004 UTC

17 Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18*/ 18*/
19 19
20#include "config.h" 20#include "config.h"
21 21
22#include <arpa/inet.h>
23#include <netdb.h> 22#include <netdb.h>
24 23
25#include "gettext.h" 24#include "gettext.h"
26 25
27#include "sockinfo.h" 26#include "sockinfo.h"
63sockinfo::set (const conf_node *conf, u8 prot_) 62sockinfo::set (const conf_node *conf, u8 prot_)
64{ 63{
65 set (conf->hostname, 64 set (conf->hostname,
66 prot_ == PROT_UDPv4 ? conf->udp_port 65 prot_ == PROT_UDPv4 ? conf->udp_port
67 : prot_ == PROT_TCPv4 ? conf->tcp_port 66 : prot_ == PROT_TCPv4 ? conf->tcp_port
67 : prot_ == PROT_DNSv4 ? conf->dns_port
68 : 0, 68 : 0,
69 prot_); 69 prot_);
70} 70}
71 71
72const sockaddr * 72const sockaddr *
119 if (conf 119 if (conf
120 && prot & PROTv4 120 && prot & PROTv4
121 && conf->protocols & PROT_TCPv4 121 && conf->protocols & PROT_TCPv4
122 && conf->tcp_port) 122 && conf->tcp_port)
123 protocols |= PROT_TCPv4; 123 protocols |= PROT_TCPv4;
124
125 if (conf
126 && prot & PROTv4
127 && conf->protocols & PROT_DNSv4)
128 protocols |= PROT_DNSv4;
124 129
125 return protocols; 130 return protocols;
126} 131}
127 132
128bool 133bool

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines