Changeset aefaac3a
- Timestamp:
- 2008-04-06T15:34:25Z (17 years ago)
- Branches:
- master
- Children:
- 99f929c
- Parents:
- aa31117
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
bitlbee.c
raa31117 raefaac3a 54 54 ; 55 55 56 i = getaddrinfo( global.conf->iface , global.conf->port, &hints, &addrinfo_bind );56 i = getaddrinfo( global.conf->iface_in, global.conf->port, &hints, &addrinfo_bind ); 57 57 if( i ) 58 58 { 59 59 log_message( LOGLVL_ERROR, "Couldn't parse address `%s': %s", 60 global.conf->iface , gai_strerror(i) );60 global.conf->iface_in, gai_strerror(i) ); 61 61 return -1; 62 62 } -
bitlbee.conf
raa31117 raefaac3a 34 34 # DaemonInterface = 0.0.0.0 35 35 # DaemonPort = 6667 36 37 ## ClientInterface: 38 ## 39 ## If for any reason, you want BitlBee to use a specific address/interface 40 ## for outgoing traffic (IM connections, HTTP(S), etc.), set it here. 41 ## 42 # ClientInterface = 0.0.0.0 36 43 37 44 ## AuthMode -
conf.c
raa31117 raefaac3a 45 45 conf = g_new0( conf_t, 1 ); 46 46 47 conf->iface = NULL; 47 conf->iface_in = NULL; 48 conf->iface_out = NULL; 48 49 conf->port = g_strdup( "6667" ); 49 50 conf->nofork = 0; … … 82 83 if( opt == 'i' ) 83 84 { 84 conf->iface = g_strdup( optarg );85 conf->iface_in = g_strdup( optarg ); 85 86 } 86 87 else if( opt == 'p' ) … … 202 203 else if( g_strcasecmp( ini->key, "daemoninterface" ) == 0 ) 203 204 { 204 g_free( conf->iface );205 conf->iface = g_strdup( ini->value );205 g_free( conf->iface_in ); 206 conf->iface_in = g_strdup( ini->value ); 206 207 } 207 208 else if( g_strcasecmp( ini->key, "daemonport" ) == 0 ) … … 209 210 g_free( conf->port ); 210 211 conf->port = g_strdup( ini->value ); 212 } 213 else if( g_strcasecmp( ini->key, "clientinterface" ) == 0 ) 214 { 215 g_free( conf->iface_out ); 216 conf->iface_out = g_strdup( ini->value ); 211 217 } 212 218 else if( g_strcasecmp( ini->key, "authmode" ) == 0 ) -
conf.h
raa31117 raefaac3a 32 32 typedef struct conf 33 33 { 34 char *iface ;34 char *iface_in, *iface_out; 35 35 char *port; 36 36 int nofork; -
lib/proxy.c
raa31117 raefaac3a 114 114 { 115 115 struct sockaddr_in *sin; 116 struct sockaddr_in me; 116 117 int fd = -1; 117 118 … … 127 128 128 129 sock_make_nonblocking(fd); 130 131 if( global.conf->iface_out ) 132 { 133 me.sin_family = AF_INET; 134 me.sin_port = 0; 135 me.sin_addr.s_addr = inet_addr( global.conf->iface_out ); 136 137 if( bind( fd, (struct sockaddr *) &me, sizeof( me ) ) != 0 ) 138 event_debug( "bind( %d, \"%s\" ) failure\n", fd, global.conf->iface_out ); 139 } 129 140 130 141 event_debug("proxy_connect_none( \"%s\", %d ) = %d\n", host, port, fd);
Note: See TracChangeset
for help on using the changeset viewer.