Changeset 3e1e11af
- Timestamp:
- 2007-11-19T23:41:42Z (17 years ago)
- Branches:
- master
- Children:
- d75597b
- Parents:
- 7df5a08
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
bitlbee.c
r7df5a08 r3e1e11af 50 50 hints.ai_flags = AI_ADDRCONFIG | AI_PASSIVE; 51 51 52 i = getaddrinfo( global.conf->iface, global.conf->port, &hints, 53 &addrinfo_bind ); 52 i = getaddrinfo( global.conf->iface, global.conf->port, &hints, &addrinfo_bind ); 54 53 if( i ) 55 54 { 56 log_message( LOGLVL_ERROR, "Couldn't parse address `%s': %s", 57 55 log_message( LOGLVL_ERROR, "Couldn't parse address `%s': %s", 56 global.conf->iface, gai_strerror(i) ); 58 57 return -1; 59 58 } … … 63 62 for( res = addrinfo_bind; res; res = res->ai_next ) 64 63 { 65 global.listen_socket = socket( res->ai_family, res->ai_socktype, 66 res->ai_protocol ); 64 global.listen_socket = socket( res->ai_family, res->ai_socktype, res->ai_protocol ); 67 65 if( global.listen_socket < 0 ) 68 66 continue; … … 70 68 /* TIME_WAIT (?) sucks.. */ 71 69 i = 1; 72 setsockopt( global.listen_socket, SOL_SOCKET, SO_REUSEADDR, &i, 73 sizeof( i ) ); 70 setsockopt( global.listen_socket, SOL_SOCKET, SO_REUSEADDR, &i, sizeof( i ) ); 74 71 75 72 i = bind( global.listen_socket, res->ai_addr, res->ai_addrlen ); … … 119 116 ipc_master_load_state(); 120 117 121 if( global.conf->runmode == RUNMODE_DAEMON || 122 global.conf->runmode == RUNMODE_FORKDAEMON ) 118 if( global.conf->runmode == RUNMODE_DAEMON || global.conf->runmode == RUNMODE_FORKDAEMON ) 123 119 ipc_master_listen_socket(); 124 120 -
irc.c
r7df5a08 r3e1e11af 78 78 irc->myhost = g_strdup( ipv6_unwrap( buf ) ); 79 79 } 80 else81 {82 /* Rare, but possible. */83 strncpy( irc->myhost, "localhost.localdomain", NI_MAXHOST );84 }85 80 } 86 81 … … 94 89 irc->host = g_strdup( ipv6_unwrap( buf ) ); 95 90 } 96 else97 {98 /* Rare, but possible. */99 strncpy( irc->host, "localhost.localdomain", NI_MAXHOST);100 }101 }91 } 92 93 if( irc->host == NULL ) 94 irc->host = g_strdup( "localhost.localdomain" ); 95 if( irc->myhost == NULL ) 96 irc->myhost = g_strdup( "localhost.localdomain" ); 102 97 103 98 if( global.conf->ping_interval > 0 && global.conf->ping_timeout > 0 )
Note: See TracChangeset
for help on using the changeset viewer.