Changes in / [fdba6bc:b52e478]
- Files:
-
- 2 deleted
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
bitlbee.c
rfdba6bc rb52e478 93 93 } 94 94 95 global.listen_watch_source_id = b_input_add( global.listen_socket, B_EV_IO_READ, bitlbee_io_new_client, NULL );95 global.listen_watch_source_id = b_input_add( global.listen_socket, GAIM_INPUT_READ, bitlbee_io_new_client, NULL ); 96 96 97 97 #ifndef _WIN32 … … 284 284 child->pid = client_pid; 285 285 child->ipc_fd = fds[0]; 286 child->ipc_inpa = b_input_add( child->ipc_fd, B_EV_IO_READ, ipc_master_read, child );286 child->ipc_inpa = b_input_add( child->ipc_fd, GAIM_INPUT_READ, ipc_master_read, child ); 287 287 child_list = g_slist_append( child_list, child ); 288 288 … … 312 312 /* We can store the IPC fd there now. */ 313 313 global.listen_socket = fds[1]; 314 global.listen_watch_source_id = b_input_add( fds[1], B_EV_IO_READ, ipc_child_read, irc );314 global.listen_watch_source_id = b_input_add( fds[1], GAIM_INPUT_READ, ipc_child_read, irc ); 315 315 316 316 close( fds[0] ); -
configure
rfdba6bc rb52e478 26 26 oscar=1 27 27 yahoo=1 28 purple=029 28 30 29 debug=0 … … 67 66 --oscar=0/1 Disable/enable Oscar part (ICQ, AIM) $oscar 68 67 --yahoo=0/1 Disable/enable Yahoo part $yahoo 69 70 --purple=0/1 Disable/enable libpurple support $purple71 68 72 69 --debug=0/1 Disable/enable debugging $debug … … 483 480 protoobjs='' 484 481 485 if [ "$purple" = 0 ]; then486 echo '#undef WITH_PURPLE' >> config.h487 else488 if ! $PKG_CONFIG purple; then489 echo490 echo 'Cannot find libpurple development libraries, aborting. (Install libpurple-dev?)'491 exit 1492 fi493 echo '#define WITH_PURPLE' >> config.h494 cat<<EOF>>Makefile.settings495 EFLAGS += $($PKG_CONFIG purple --libs)496 PURPLE_CFLAGS += $($PKG_CONFIG purple --cflags)497 EOF498 protocols=$protocols'purple '499 protoobjs=$protoobjs'purple_mod.o '500 501 # Having both libpurple and native IM modules in one binary may502 # do strange things. Let's not do that.503 msn=0504 jabber=0505 oscar=0506 yahoo=0507 fi508 509 482 if [ "$msn" = 0 ]; then 510 483 echo '#undef WITH_MSN' >> config.h -
help.c
rfdba6bc rb52e478 2 2 * BitlBee -- An IRC to other IM-networks gateway * 3 3 * * 4 * Copyright 2002-200 9Wilmer van der Gaast and others *4 * Copyright 2002-2005 Wilmer van der Gaast and others * 5 5 \********************************************************************/ 6 6 … … 169 169 return NULL; 170 170 } 171 172 int help_add_mem( help_t **help, const char *title, const char *content )173 {174 help_t *h, *l = NULL;175 176 for( h = *help; h; h = h->next )177 {178 if( g_strcasecmp( h->title, title ) == 0 )179 return 0;180 181 l = h;182 }183 184 if( l )185 h = l->next = g_new0( struct help, 1 );186 else187 *help = h = g_new0( struct help, 1 );188 h->fd = -1;189 h->title = g_strdup( title );190 h->length = strlen( content );191 h->offset.mem_offset = g_strdup( content );192 193 return 1;194 } -
help.h
rfdba6bc rb52e478 46 46 void help_free( help_t **help ); 47 47 char *help_get( help_t **help, char *title ); 48 int help_add_mem( help_t **help, const char *title, const char *content_ );49 48 50 49 #endif -
ipc.c
rfdba6bc rb52e478 514 514 } 515 515 516 child->ipc_inpa = b_input_add( child->ipc_fd, B_EV_IO_READ, ipc_master_read, child );516 child->ipc_inpa = b_input_add( child->ipc_fd, GAIM_INPUT_READ, ipc_master_read, child ); 517 517 518 518 child_list = g_slist_append( child_list, child ); … … 552 552 } 553 553 554 b_input_add( serversock, B_EV_IO_READ, new_ipc_client, NULL );554 b_input_add( serversock, GAIM_INPUT_READ, new_ipc_client, NULL ); 555 555 556 556 return 1; … … 597 597 return 0; 598 598 } 599 child->ipc_inpa = b_input_add( child->ipc_fd, B_EV_IO_READ, ipc_master_read, child );599 child->ipc_inpa = b_input_add( child->ipc_fd, GAIM_INPUT_READ, ipc_master_read, child ); 600 600 601 601 child_list = g_slist_append( child_list, child ); -
irc.c
rfdba6bc rb52e478 109 109 sock_make_nonblocking( irc->fd ); 110 110 111 irc->r_watch_source_id = b_input_add( irc->fd, B_EV_IO_READ, bitlbee_io_current_client_read, irc );111 irc->r_watch_source_id = b_input_add( irc->fd, GAIM_INPUT_READ, bitlbee_io_current_client_read, irc ); 112 112 113 113 irc->status = USTATUS_OFFLINE; … … 194 194 /* Evaluator sets the iconv/oconv structures. */ 195 195 set_eval_charset( set_find( &irc->set, "charset" ), set_getstr( &irc->set, "charset" ) ); 196 197 nogaim_init();198 196 199 197 return( irc ); … … 678 676 in the event queue. */ 679 677 /* Really can't be done as long as the code doesn't do error checking very well: 680 if( bitlbee_io_current_client_write( irc, irc->fd, B_EV_IO_WRITE ) ) */678 if( bitlbee_io_current_client_write( irc, irc->fd, GAIM_INPUT_WRITE ) ) */ 681 679 682 680 /* So just always do it via the event handler. */ 683 irc->w_watch_source_id = b_input_add( irc->fd, B_EV_IO_WRITE, bitlbee_io_current_client_write, irc );681 irc->w_watch_source_id = b_input_add( irc->fd, GAIM_INPUT_WRITE, bitlbee_io_current_client_write, irc ); 684 682 } 685 683 … … 707 705 if( now ) 708 706 { 709 bitlbee_io_current_client_write( irc, irc->fd, B_EV_IO_WRITE );707 bitlbee_io_current_client_write( irc, irc->fd, GAIM_INPUT_WRITE ); 710 708 } 711 709 temp = temp->next; -
lib/events.h
rfdba6bc rb52e478 48 48 the given callback function. */ 49 49 typedef enum { 50 B_EV_IO_READ = 1 << 0, 51 B_EV_IO_WRITE = 1 << 1, 52 B_EV_FLAG_FORCE_ONCE = 1 << 16, 53 B_EV_FLAG_FORCE_REPEAT = 1 << 17, 50 GAIM_INPUT_READ = 1 << 1, 51 GAIM_INPUT_WRITE = 1 << 2 54 52 } b_input_condition; 55 53 typedef gboolean (*b_event_handler)(gpointer data, gint fd, b_input_condition cond); -
lib/events_glib.c
rfdba6bc rb52e478 49 49 b_event_handler function; 50 50 gpointer data; 51 guint flags;52 51 } GaimIOClosure; 53 52 … … 77 76 78 77 if (condition & GAIM_READ_COND) 79 gaim_cond |= B_EV_IO_READ;78 gaim_cond |= GAIM_INPUT_READ; 80 79 if (condition & GAIM_WRITE_COND) 81 gaim_cond |= B_EV_IO_WRITE;80 gaim_cond |= GAIM_INPUT_WRITE; 82 81 83 82 event_debug( "gaim_io_invoke( %d, %d, 0x%x )\n", g_io_channel_unix_get_fd(source), condition, data ); … … 88 87 event_debug( "Returned FALSE, cancelling.\n" ); 89 88 90 if (closure->flags & B_EV_FLAG_FORCE_ONCE) 91 return FALSE; 92 else if (closure->flags & B_EV_FLAG_FORCE_REPEAT) 93 return TRUE; 94 else 95 return st; 89 return st; 96 90 } 97 91 … … 111 105 closure->function = function; 112 106 closure->data = data; 113 closure->flags = condition;114 107 115 if (condition & B_EV_IO_READ)108 if (condition & GAIM_INPUT_READ) 116 109 cond |= GAIM_READ_COND; 117 if (condition & B_EV_IO_WRITE)110 if (condition & GAIM_INPUT_WRITE) 118 111 cond |= GAIM_WRITE_COND; 119 112 -
lib/events_libevent.c
rfdba6bc rb52e478 60 60 b_event_handler function; 61 61 void *data; 62 guint flags;63 62 }; 64 63 … … 127 126 { 128 127 if( event & EV_READ ) 129 cond |= B_EV_IO_READ;128 cond |= GAIM_INPUT_READ; 130 129 if( event & EV_WRITE ) 131 cond |= B_EV_IO_WRITE;130 cond |= GAIM_INPUT_WRITE; 132 131 } 133 132 … … 151 150 return; 152 151 } 153 else if( !st && !( b_ev->flags & B_EV_FLAG_FORCE_REPEAT ))152 else if( !st ) 154 153 { 155 154 event_debug( "Handler returned FALSE: " ); … … 175 174 event_debug( "b_input_add( %d, %d, 0x%x, 0x%x ) ", fd, condition, function, data ); 176 175 177 if( ( condition & B_EV_IO_READ && ( b_ev = g_hash_table_lookup( read_hash, &fd ) ) ) ||178 ( condition & B_EV_IO_WRITE && ( b_ev = g_hash_table_lookup( write_hash, &fd ) ) ) )176 if( ( condition & GAIM_INPUT_READ && ( b_ev = g_hash_table_lookup( read_hash, &fd ) ) ) || 177 ( condition & GAIM_INPUT_WRITE && ( b_ev = g_hash_table_lookup( write_hash, &fd ) ) ) ) 179 178 { 180 179 /* We'll stick with this libevent entry, but give it a new BitlBee id. */ … … 199 198 200 199 out_cond = EV_PERSIST; 201 if( condition & B_EV_IO_READ )200 if( condition & GAIM_INPUT_READ ) 202 201 out_cond |= EV_READ; 203 if( condition & B_EV_IO_WRITE )202 if( condition & GAIM_INPUT_WRITE ) 204 203 out_cond |= EV_WRITE; 205 204 … … 213 212 } 214 213 215 b_ev->flags = condition;216 214 g_hash_table_insert( id_hash, &b_ev->id, b_ev ); 217 215 return b_ev->id; -
lib/http_client.c
rfdba6bc rb52e478 149 149 if( req->bytes_written < req->request_length ) 150 150 req->inpa = b_input_add( source, 151 req->ssl ? ssl_getdirection( req->ssl ) : B_EV_IO_WRITE,151 req->ssl ? ssl_getdirection( req->ssl ) : GAIM_INPUT_WRITE, 152 152 http_connected, req ); 153 153 else 154 req->inpa = b_input_add( source, B_EV_IO_READ, http_incoming_data, req );154 req->inpa = b_input_add( source, GAIM_INPUT_READ, http_incoming_data, req ); 155 155 156 156 return FALSE; … … 234 234 /* There will be more! */ 235 235 req->inpa = b_input_add( req->fd, 236 req->ssl ? ssl_getdirection( req->ssl ) : B_EV_IO_READ,236 req->ssl ? ssl_getdirection( req->ssl ) : GAIM_INPUT_READ, 237 237 http_incoming_data, req ); 238 238 -
lib/proxy.c
rfdba6bc rb52e478 91 91 b_event_remove(phb->inpa); 92 92 if( phb->proxy_func ) 93 phb->proxy_func(phb->proxy_data, -1, B_EV_IO_READ);93 phb->proxy_func(phb->proxy_data, -1, GAIM_INPUT_READ); 94 94 else { 95 phb->func(phb->data, -1, B_EV_IO_READ);95 phb->func(phb->data, -1, GAIM_INPUT_READ); 96 96 g_free(phb); 97 97 } … … 102 102 b_event_remove(phb->inpa); 103 103 if( phb->proxy_func ) 104 phb->proxy_func(phb->proxy_data, source, B_EV_IO_READ);104 phb->proxy_func(phb->proxy_data, source, GAIM_INPUT_READ); 105 105 else { 106 phb->func(phb->data, source, B_EV_IO_READ);106 phb->func(phb->data, source, GAIM_INPUT_READ); 107 107 g_free(phb); 108 108 } … … 147 147 return -1; 148 148 } else { 149 phb->inpa = b_input_add(fd, B_EV_IO_WRITE, gaim_io_connected, phb);149 phb->inpa = b_input_add(fd, GAIM_INPUT_WRITE, gaim_io_connected, phb); 150 150 phb->fd = fd; 151 151 … … 179 179 if ((memcmp(HTTP_GOODSTRING, inputline, strlen(HTTP_GOODSTRING)) == 0) || 180 180 (memcmp(HTTP_GOODSTRING2, inputline, strlen(HTTP_GOODSTRING2)) == 0)) { 181 phb->func(phb->data, source, B_EV_IO_READ);181 phb->func(phb->data, source, GAIM_INPUT_READ); 182 182 g_free(phb->host); 183 183 g_free(phb); … … 186 186 187 187 close(source); 188 phb->func(phb->data, -1, B_EV_IO_READ);188 phb->func(phb->data, -1, GAIM_INPUT_READ); 189 189 g_free(phb->host); 190 190 g_free(phb); … … 204 204 if (getsockopt(source, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { 205 205 close(source); 206 phb->func(phb->data, -1, B_EV_IO_READ);206 phb->func(phb->data, -1, GAIM_INPUT_READ); 207 207 g_free(phb->host); 208 208 g_free(phb); … … 215 215 if (send(source, cmd, strlen(cmd), 0) < 0) { 216 216 close(source); 217 phb->func(phb->data, -1, B_EV_IO_READ);217 phb->func(phb->data, -1, GAIM_INPUT_READ); 218 218 g_free(phb->host); 219 219 g_free(phb); … … 230 230 if (send(source, cmd, strlen(cmd), 0) < 0) { 231 231 close(source); 232 phb->func(phb->data, -1, B_EV_IO_READ);232 phb->func(phb->data, -1, GAIM_INPUT_READ); 233 233 g_free(phb->host); 234 234 g_free(phb); … … 240 240 if (send(source, cmd, strlen(cmd), 0) < 0) { 241 241 close(source); 242 phb->func(phb->data, -1, B_EV_IO_READ);243 g_free(phb->host); 244 g_free(phb); 245 return FALSE; 246 } 247 248 phb->inpa = b_input_add(source, B_EV_IO_READ, http_canread, phb);242 phb->func(phb->data, -1, GAIM_INPUT_READ); 243 g_free(phb->host); 244 g_free(phb); 245 return FALSE; 246 } 247 248 phb->inpa = b_input_add(source, GAIM_INPUT_READ, http_canread, phb); 249 249 250 250 return FALSE; … … 273 273 memset(packet, 0, sizeof(packet)); 274 274 if (read(source, packet, 9) >= 4 && packet[1] == 90) { 275 phb->func(phb->data, source, B_EV_IO_READ);275 phb->func(phb->data, source, GAIM_INPUT_READ); 276 276 g_free(phb->host); 277 277 g_free(phb); … … 280 280 281 281 close(source); 282 phb->func(phb->data, -1, B_EV_IO_READ);282 phb->func(phb->data, -1, GAIM_INPUT_READ); 283 283 g_free(phb->host); 284 284 g_free(phb); … … 299 299 if (getsockopt(source, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { 300 300 close(source); 301 phb->func(phb->data, -1, B_EV_IO_READ);301 phb->func(phb->data, -1, GAIM_INPUT_READ); 302 302 g_free(phb->host); 303 303 g_free(phb); … … 309 309 if (!(hp = gethostbyname(phb->host))) { 310 310 close(source); 311 phb->func(phb->data, -1, B_EV_IO_READ);311 phb->func(phb->data, -1, GAIM_INPUT_READ); 312 312 g_free(phb->host); 313 313 g_free(phb); … … 326 326 if (write(source, packet, 9) != 9) { 327 327 close(source); 328 phb->func(phb->data, -1, B_EV_IO_READ);329 g_free(phb->host); 330 g_free(phb); 331 return FALSE; 332 } 333 334 phb->inpa = b_input_add(source, B_EV_IO_READ, s4_canread, phb);328 phb->func(phb->data, -1, GAIM_INPUT_READ); 329 g_free(phb->host); 330 g_free(phb); 331 return FALSE; 332 } 333 334 phb->inpa = b_input_add(source, GAIM_INPUT_READ, s4_canread, phb); 335 335 336 336 return FALSE; … … 359 359 if (read(source, buf, 10) < 10) { 360 360 close(source); 361 phb->func(phb->data, -1, B_EV_IO_READ);361 phb->func(phb->data, -1, GAIM_INPUT_READ); 362 362 g_free(phb->host); 363 363 g_free(phb); … … 366 366 if ((buf[0] != 0x05) || (buf[1] != 0x00)) { 367 367 close(source); 368 phb->func(phb->data, -1, B_EV_IO_READ);369 g_free(phb->host); 370 g_free(phb); 371 return FALSE; 372 } 373 374 phb->func(phb->data, source, B_EV_IO_READ);368 phb->func(phb->data, -1, GAIM_INPUT_READ); 369 g_free(phb->host); 370 g_free(phb); 371 return FALSE; 372 } 373 374 phb->func(phb->data, source, GAIM_INPUT_READ); 375 375 g_free(phb->host); 376 376 g_free(phb); … … 396 396 if (write(source, buf, (5 + strlen(phb->host) + 2)) < (5 + strlen(phb->host) + 2)) { 397 397 close(source); 398 phb->func(phb->data, -1, B_EV_IO_READ);398 phb->func(phb->data, -1, GAIM_INPUT_READ); 399 399 g_free(phb->host); 400 400 g_free(phb); … … 402 402 } 403 403 404 phb->inpa = b_input_add(source, B_EV_IO_READ, s5_canread_again, phb);404 phb->inpa = b_input_add(source, GAIM_INPUT_READ, s5_canread_again, phb); 405 405 } 406 406 … … 414 414 if (read(source, buf, 2) < 2) { 415 415 close(source); 416 phb->func(phb->data, -1, B_EV_IO_READ);416 phb->func(phb->data, -1, GAIM_INPUT_READ); 417 417 g_free(phb->host); 418 418 g_free(phb); … … 422 422 if ((buf[0] != 0x01) || (buf[1] != 0x00)) { 423 423 close(source); 424 phb->func(phb->data, -1, B_EV_IO_READ);424 phb->func(phb->data, -1, GAIM_INPUT_READ); 425 425 g_free(phb->host); 426 426 g_free(phb); … … 442 442 if (read(source, buf, 2) < 2) { 443 443 close(source); 444 phb->func(phb->data, -1, B_EV_IO_READ);444 phb->func(phb->data, -1, GAIM_INPUT_READ); 445 445 g_free(phb->host); 446 446 g_free(phb); … … 450 450 if ((buf[0] != 0x05) || (buf[1] == 0xff)) { 451 451 close(source); 452 phb->func(phb->data, -1, B_EV_IO_READ);452 phb->func(phb->data, -1, GAIM_INPUT_READ); 453 453 g_free(phb->host); 454 454 g_free(phb); … … 465 465 if (write(source, buf, 3 + i + j) < 3 + i + j) { 466 466 close(source); 467 phb->func(phb->data, -1, B_EV_IO_READ);467 phb->func(phb->data, -1, GAIM_INPUT_READ); 468 468 g_free(phb->host); 469 469 g_free(phb); … … 471 471 } 472 472 473 phb->inpa = b_input_add(source, B_EV_IO_READ, s5_readauth, phb);473 phb->inpa = b_input_add(source, GAIM_INPUT_READ, s5_readauth, phb); 474 474 } else { 475 475 s5_sendconnect(phb, source); … … 491 491 if (getsockopt(source, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { 492 492 close(source); 493 phb->func(phb->data, -1, B_EV_IO_READ);493 phb->func(phb->data, -1, GAIM_INPUT_READ); 494 494 g_free(phb->host); 495 495 g_free(phb); … … 513 513 if (write(source, buf, i) < i) { 514 514 close(source); 515 phb->func(phb->data, -1, B_EV_IO_READ);516 g_free(phb->host); 517 g_free(phb); 518 return FALSE; 519 } 520 521 phb->inpa = b_input_add(source, B_EV_IO_READ, s5_canread, phb);515 phb->func(phb->data, -1, GAIM_INPUT_READ); 516 g_free(phb->host); 517 g_free(phb); 518 return FALSE; 519 } 520 521 phb->inpa = b_input_add(source, GAIM_INPUT_READ, s5_canread, phb); 522 522 523 523 return FALSE; -
lib/ssl_bogus.c
rfdba6bc rb52e478 59 59 b_input_condition ssl_getdirection( void *conn ) 60 60 { 61 return B_EV_IO_READ;61 return GAIM_INPUT_READ; 62 62 } 63 63 -
lib/ssl_client.h
rfdba6bc rb52e478 71 71 G_MODULE_EXPORT int ssl_getfd( void *conn ); 72 72 73 /* This function returns B_EV_IO_READ/WRITE. With SSL connections it's73 /* This function returns GAIM_INPUT_READ/WRITE. With SSL connections it's 74 74 possible that something has to be read while actually were trying to 75 75 write something (think about key exchange/refresh/etc). So when an -
lib/ssl_gnutls.c
rfdba6bc rb52e478 106 106 struct scd *conn = data; 107 107 108 return ssl_connected( conn, conn->fd, B_EV_IO_WRITE );108 return ssl_connected( conn, conn->fd, GAIM_INPUT_WRITE ); 109 109 } 110 110 … … 244 244 { 245 245 return( gnutls_record_get_direction( ((struct scd*)conn)->session ) ? 246 B_EV_IO_WRITE : B_EV_IO_READ );247 } 246 GAIM_INPUT_WRITE : GAIM_INPUT_READ ); 247 } -
lib/ssl_nss.c
rfdba6bc rb52e478 193 193 { 194 194 /* Just in case someone calls us, let's return the most likely case: */ 195 return B_EV_IO_READ;195 return GAIM_INPUT_READ; 196 196 } -
lib/ssl_openssl.c
rfdba6bc rb52e478 102 102 struct scd *conn = data; 103 103 104 return ssl_connected( conn, conn->fd, B_EV_IO_WRITE );104 return ssl_connected( conn, conn->fd, GAIM_INPUT_WRITE ); 105 105 } 106 106 … … 270 270 b_input_condition ssl_getdirection( void *conn ) 271 271 { 272 return( ((struct scd*)conn)->lasterr == SSL_ERROR_WANT_WRITE ? B_EV_IO_WRITE : B_EV_IO_READ );273 } 272 return( ((struct scd*)conn)->lasterr == SSL_ERROR_WANT_WRITE ? GAIM_INPUT_WRITE : GAIM_INPUT_READ ); 273 } -
lib/ssl_sspi.c
rfdba6bc rb52e478 275 275 GaimInputCondition ssl_getdirection( void *conn ) 276 276 { 277 return B_EV_IO_WRITE; /* FIXME: or B_EV_IO_READ */278 } 277 return GAIM_INPUT_WRITE; /* FIXME: or GAIM_INPUT_READ */ 278 } -
protocols/jabber/io.c
rfdba6bc rb52e478 64 64 most cases it probably won't be necessary.) */ 65 65 if( ( ret = jabber_write_queue( ic ) ) && jd->tx_len > 0 ) 66 jd->w_inpa = b_input_add( jd->fd, B_EV_IO_WRITE, jabber_write_callback, ic );66 jd->w_inpa = b_input_add( jd->fd, GAIM_INPUT_WRITE, jabber_write_callback, ic ); 67 67 } 68 68 else … … 529 529 530 530 if( jd->r_inpa <= 0 ) 531 jd->r_inpa = b_input_add( jd->fd, B_EV_IO_READ, jabber_read_callback, ic );531 jd->r_inpa = b_input_add( jd->fd, GAIM_INPUT_READ, jabber_read_callback, ic ); 532 532 533 533 greet = g_strdup_printf( "<?xml version='1.0' ?>" -
protocols/msn/ns.c
rfdba6bc rb52e478 75 75 if( msn_write( ic, s, strlen( s ) ) ) 76 76 { 77 ic->inpa = b_input_add( md->fd, B_EV_IO_READ, msn_ns_callback, ic );77 ic->inpa = b_input_add( md->fd, GAIM_INPUT_READ, msn_ns_callback, ic ); 78 78 imcb_log( ic, "Connected to server, waiting for reply" ); 79 79 } -
protocols/msn/sb.c
rfdba6bc rb52e478 309 309 310 310 if( msn_sb_write( sb, buf, strlen( buf ) ) ) 311 sb->inp = b_input_add( sb->fd, B_EV_IO_READ, msn_sb_callback, sb );311 sb->inp = b_input_add( sb->fd, GAIM_INPUT_READ, msn_sb_callback, sb ); 312 312 else 313 313 debug( "Error %d while connecting to switchboard server", 2 ); -
protocols/nogaim.c
rfdba6bc rb52e478 104 104 { 105 105 GList *gl; 106 107 for( gl = protocols; gl; gl = gl->next ) 106 for (gl = protocols; gl; gl = gl->next) 108 107 { 109 108 struct prpl *proto = gl->data; 110 111 if( g_strcasecmp( proto->name, name ) == 0 ) 109 if(!g_strcasecmp(proto->name, name)) 112 110 return proto; 113 111 } 114 115 112 return NULL; 116 113 } … … 123 120 extern void byahoo_initmodule(); 124 121 extern void jabber_initmodule(); 125 extern void purple_initmodule();126 122 127 123 #ifdef WITH_MSN … … 139 135 #ifdef WITH_JABBER 140 136 jabber_initmodule(); 141 #endif142 143 #ifdef WITH_PURPLE144 purple_initmodule();145 137 #endif 146 138 -
protocols/nogaim.h
rfdba6bc rb52e478 132 132 * - The user sees this name ie. when imcb_log() is used. */ 133 133 const char *name; 134 void *data;135 134 136 135 /* Added this one to be able to add per-account settings, don't think -
protocols/oscar/oscar.c
rfdba6bc rb52e478 291 291 odata = (struct oscar_data *)ic->proto_data; 292 292 293 if (condition & B_EV_IO_READ) {293 if (condition & GAIM_INPUT_READ) { 294 294 if (aim_get_command(odata->sess, conn) >= 0) { 295 295 aim_rxdispatch(odata->sess); … … 363 363 364 364 aim_conn_completeconnect(sess, conn); 365 ic->inpa = b_input_add(conn->fd, B_EV_IO_READ,365 ic->inpa = b_input_add(conn->fd, GAIM_INPUT_READ, 366 366 oscar_callback, conn); 367 367 … … 489 489 490 490 aim_conn_completeconnect(sess, bosconn); 491 ic->inpa = b_input_add(bosconn->fd, B_EV_IO_READ,491 ic->inpa = b_input_add(bosconn->fd, GAIM_INPUT_READ, 492 492 oscar_callback, bosconn); 493 493 imcb_log(ic, _("Connection established, cookie sent")); … … 665 665 if (pos->modname) 666 666 g_free(pos->modname); 667 pos->inpa = b_input_add(pos->fd, B_EV_IO_READ, damn_you, pos);667 pos->inpa = b_input_add(pos->fd, GAIM_INPUT_READ, damn_you, pos); 668 668 return FALSE; 669 669 } … … 834 834 835 835 aim_conn_completeconnect(sess, tstconn); 836 odata->cnpa = b_input_add(tstconn->fd, B_EV_IO_READ,836 odata->cnpa = b_input_add(tstconn->fd, GAIM_INPUT_READ, 837 837 oscar_callback, tstconn); 838 838 … … 862 862 863 863 aim_conn_completeconnect(sess, tstconn); 864 odata->paspa = b_input_add(tstconn->fd, B_EV_IO_READ,864 odata->paspa = b_input_add(tstconn->fd, GAIM_INPUT_READ, 865 865 oscar_callback, tstconn); 866 866 … … 898 898 aim_conn_completeconnect(sess, ccon->conn); 899 899 ccon->inpa = b_input_add(tstconn->fd, 900 B_EV_IO_READ,900 GAIM_INPUT_READ, 901 901 oscar_callback, tstconn); 902 902 odata->oscar_chats = g_slist_append(odata->oscar_chats, ccon); -
protocols/yahoo/yahoo.c
rfdba6bc rb52e478 681 681 682 682 inp->d = d; 683 d->tag = inp->h = b_input_add( fd, B_EV_IO_READ, (b_event_handler) byahoo_read_ready_callback, (gpointer) d );683 d->tag = inp->h = b_input_add( fd, GAIM_INPUT_READ, (b_event_handler) byahoo_read_ready_callback, (gpointer) d ); 684 684 } 685 685 else if( cond == YAHOO_INPUT_WRITE ) … … 692 692 693 693 inp->d = d; 694 d->tag = inp->h = b_input_add( fd, B_EV_IO_WRITE, (b_event_handler) byahoo_write_ready_callback, (gpointer) d );694 d->tag = inp->h = b_input_add( fd, GAIM_INPUT_WRITE, (b_event_handler) byahoo_write_ready_callback, (gpointer) d ); 695 695 } 696 696 else -
set.c
rfdba6bc rb52e478 29 29 char *SET_INVALID = "nee"; 30 30 31 set_t *set_add( set_t **head, c onst char *key, constchar *def, set_eval eval, void *data )31 set_t *set_add( set_t **head, char *key, char *def, set_eval eval, void *data ) 32 32 { 33 33 set_t *s = set_find( head, key ); … … 63 63 } 64 64 65 set_t *set_find( set_t **head, c onst char *key )65 set_t *set_find( set_t **head, char *key ) 66 66 { 67 67 set_t *s = *head; … … 77 77 } 78 78 79 char *set_getstr( set_t **head, c onst char *key )79 char *set_getstr( set_t **head, char *key ) 80 80 { 81 81 set_t *s = set_find( head, key ); … … 87 87 } 88 88 89 int set_getint( set_t **head, c onst char *key )89 int set_getint( set_t **head, char *key ) 90 90 { 91 91 char *s = set_getstr( head, key ); … … 101 101 } 102 102 103 int set_getbool( set_t **head, c onst char *key )103 int set_getbool( set_t **head, char *key ) 104 104 { 105 105 char *s = set_getstr( head, key ); … … 111 111 } 112 112 113 int set_setstr( set_t **head, c onst char *key, char *value )113 int set_setstr( set_t **head, char *key, char *value ) 114 114 { 115 115 set_t *s = set_find( head, key ); … … 150 150 } 151 151 152 int set_setint( set_t **head, c onst char *key, int value )152 int set_setint( set_t **head, char *key, int value ) 153 153 { 154 154 char s[24]; /* Not quite 128-bit clean eh? ;-) */ … … 158 158 } 159 159 160 void set_del( set_t **head, c onst char *key )160 void set_del( set_t **head, char *key ) 161 161 { 162 162 set_t *s = *head, *t = NULL; … … 182 182 } 183 183 184 int set_reset( set_t **head, c onst char *key )184 int set_reset( set_t **head, char *key ) 185 185 { 186 186 set_t *s; -
set.h
rfdba6bc rb52e478 73 73 74 74 /* Should be pretty clear. */ 75 set_t *set_add( set_t **head, c onst char *key, constchar *def, set_eval eval, void *data );75 set_t *set_add( set_t **head, char *key, char *def, set_eval eval, void *data ); 76 76 77 77 /* Returns the raw set_t. Might be useful sometimes. */ 78 set_t *set_find( set_t **head, c onst char *key );78 set_t *set_find( set_t **head, char *key ); 79 79 80 80 /* Returns a pointer to the string value of this setting. Don't modify the 81 81 returned string, and don't free() it! */ 82 G_MODULE_EXPORT char *set_getstr( set_t **head, c onst char *key );82 G_MODULE_EXPORT char *set_getstr( set_t **head, char *key ); 83 83 84 84 /* Get an integer. In previous versions set_getint() was also used to read 85 85 boolean values, but this SHOULD be done with set_getbool() now! */ 86 G_MODULE_EXPORT int set_getint( set_t **head, c onst char *key );87 G_MODULE_EXPORT int set_getbool( set_t **head, c onst char *key );86 G_MODULE_EXPORT int set_getint( set_t **head, char *key ); 87 G_MODULE_EXPORT int set_getbool( set_t **head, char *key ); 88 88 89 89 /* set_setstr() strdup()s the given value, so after using this function 90 90 you can free() it, if you want. */ 91 int set_setstr( set_t **head, c onst char *key, char *value );92 int set_setint( set_t **head, c onst char *key, int value );93 void set_del( set_t **head, c onst char *key );94 int set_reset( set_t **head, c onst char *key );91 int set_setstr( set_t **head, char *key, char *value ); 92 int set_setint( set_t **head, char *key, int value ); 93 void set_del( set_t **head, char *key ); 94 int set_reset( set_t **head, char *key ); 95 95 96 96 /* Two very useful generic evaluators. */ -
unix.c
rfdba6bc rb52e478 47 47 48 48 log_init(); 49 50 49 global.conf_file = g_strdup( CONF_FILE_DEF ); 51 50 global.conf = conf_load( argc, argv ); … … 54 53 55 54 b_main_init(); 55 nogaim_init(); 56 56 57 57 srand( time( NULL ) ^ getpid() ); 58 59 58 global.helpfile = g_strdup( HELP_FILE ); 60 if( help_init( &global.help, global.helpfile ) == NULL )61 log_message( LOGLVL_WARNING, "Error opening helpfile %s.", HELP_FILE );62 63 global.storage = storage_init( global.conf->primary_storage, global.conf->migrate_storage );64 if( global.storage == NULL )65 {66 log_message( LOGLVL_ERROR, "Unable to load storage backend '%s'", global.conf->primary_storage );67 return( 1 );68 }69 59 70 60 if( global.conf->runmode == RUNMODE_INETD ) … … 114 104 setuid( pw->pw_uid ); 115 105 } 106 } 107 108 global.storage = storage_init( global.conf->primary_storage, global.conf->migrate_storage ); 109 if( global.storage == NULL ) 110 { 111 log_message( LOGLVL_ERROR, "Unable to load storage backend '%s'", global.conf->primary_storage ); 112 return( 1 ); 116 113 } 117 114 … … 133 130 if( !getuid() || !geteuid() ) 134 131 log_message( LOGLVL_WARNING, "BitlBee is running with root privileges. Why?" ); 132 if( help_init( &global.help, global.helpfile ) == NULL ) 133 log_message( LOGLVL_WARNING, "Error opening helpfile %s.", HELP_FILE ); 135 134 136 135 b_main_run();
Note: See TracChangeset
for help on using the changeset viewer.