Changeset ba9edaa for protocols/oscar
- Timestamp:
- 2006-05-10T17:34:46Z (19 years ago)
- Branches:
- master
- Children:
- 13cc96c
- Parents:
- 67b6766
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/oscar/oscar.c
r67b6766 rba9edaa 253 253 static int msgerrreasonlen = 25; 254 254 255 static voidoscar_callback(gpointer data, gint source,256 GaimInputCondition condition) {255 static gboolean oscar_callback(gpointer data, gint source, 256 b_input_condition condition) { 257 257 aim_conn_t *conn = (aim_conn_t *)data; 258 258 aim_session_t *sess = aim_conn_getsess(conn); … … 262 262 if (!gc) { 263 263 /* gc is null. we return, else we seg SIGSEG on next line. */ 264 return ;264 return FALSE; 265 265 } 266 266 … … 268 268 /* oh boy. this is probably bad. i guess the only thing we 269 269 * can really do is return? */ 270 return ;270 return FALSE; 271 271 } 272 272 … … 288 288 c->conn = NULL; 289 289 if (c->inpa > 0) 290 gaim_input_remove(c->inpa);290 b_event_remove(c->inpa); 291 291 c->inpa = 0; 292 292 c->fd = -1; … … 296 296 } else if (conn->type == AIM_CONN_TYPE_CHATNAV) { 297 297 if (odata->cnpa > 0) 298 gaim_input_remove(odata->cnpa);298 b_event_remove(odata->cnpa); 299 299 odata->cnpa = 0; 300 300 while (odata->create_rooms) { … … 310 310 } else if (conn->type == AIM_CONN_TYPE_AUTH) { 311 311 if (odata->paspa > 0) 312 gaim_input_remove(odata->paspa);312 b_event_remove(odata->paspa); 313 313 odata->paspa = 0; 314 314 aim_conn_kill(odata->sess, &conn); … … 317 317 } 318 318 } 319 } 320 } 321 322 static void oscar_login_connect(gpointer data, gint source, GaimInputCondition cond) 319 } else { 320 /* WTF??? */ 321 return FALSE; 322 } 323 324 return TRUE; 325 } 326 327 static gboolean oscar_login_connect(gpointer data, gint source, b_input_condition cond) 323 328 { 324 329 struct gaim_connection *gc = data; … … 329 334 if (!g_slist_find(get_connections(), gc)) { 330 335 closesocket(source); 331 return ;336 return FALSE; 332 337 } 333 338 … … 339 344 hide_login_progress(gc, _("Couldn't connect to host")); 340 345 signoff(gc); 341 return ;346 return FALSE; 342 347 } 343 348 344 349 aim_conn_completeconnect(sess, conn); 345 gc->inpa = gaim_input_add(conn->fd, GAIM_INPUT_READ,350 gc->inpa = b_input_add(conn->fd, GAIM_INPUT_READ, 346 351 oscar_callback, conn); 352 353 return FALSE; 347 354 } 348 355 … … 412 419 struct chat_connection *n = odata->oscar_chats->data; 413 420 if (n->inpa > 0) 414 gaim_input_remove(n->inpa);421 b_event_remove(n->inpa); 415 422 g_free(n->name); 416 423 g_free(n->show); … … 431 438 g_free(odata->oldp); 432 439 if (gc->inpa > 0) 433 gaim_input_remove(gc->inpa);440 b_event_remove(gc->inpa); 434 441 if (odata->cnpa > 0) 435 gaim_input_remove(odata->cnpa);442 b_event_remove(odata->cnpa); 436 443 if (odata->paspa > 0) 437 gaim_input_remove(odata->paspa);444 b_event_remove(odata->paspa); 438 445 aim_session_kill(odata->sess); 439 446 g_free(odata->sess); … … 443 450 } 444 451 445 static void oscar_bos_connect(gpointer data, gint source, GaimInputCondition cond) {452 static gboolean oscar_bos_connect(gpointer data, gint source, b_input_condition cond) { 446 453 struct gaim_connection *gc = data; 447 454 struct oscar_data *odata; … … 451 458 if (!g_slist_find(get_connections(), gc)) { 452 459 closesocket(source); 453 return ;460 return FALSE; 454 461 } 455 462 … … 461 468 hide_login_progress(gc, _("Could Not Connect")); 462 469 signoff(gc); 463 return ;470 return FALSE; 464 471 } 465 472 466 473 aim_conn_completeconnect(sess, bosconn); 467 gc->inpa = gaim_input_add(bosconn->fd, GAIM_INPUT_READ,474 gc->inpa = b_input_add(bosconn->fd, GAIM_INPUT_READ, 468 475 oscar_callback, bosconn); 469 476 set_login_progress(gc, 4, _("Connection established, cookie sent")); 477 478 return FALSE; 470 479 } 471 480 … … 570 579 } 571 580 aim_sendcookie(sess, bosconn, info->cookie); 572 gaim_input_remove(gc->inpa);581 b_event_remove(gc->inpa); 573 582 574 583 return 1; … … 585 594 }; 586 595 587 static void damn_you(gpointer data, gint source, GaimInputCondition c)596 static gboolean damn_you(gpointer data, gint source, b_input_condition c) 588 597 { 589 598 struct pieceofcrap *pos = data; … … 605 614 do_error_dialog(pos->gc, "Gaim was unable to get a valid hash for logging into AIM." 606 615 " You may be disconnected shortly.", "Login Error"); 607 gaim_input_remove(pos->inpa);616 b_event_remove(pos->inpa); 608 617 closesocket(pos->fd); 609 618 g_free(pos); 610 return ;619 return FALSE; 611 620 } 612 621 /* [WvG] Wheeeee! Who needs error checking anyway? ;-) */ 613 622 read(pos->fd, m, 16); 614 623 m[16] = '\0'; 615 gaim_input_remove(pos->inpa);624 b_event_remove(pos->inpa); 616 625 closesocket(pos->fd); 617 626 aim_sendmemblock(od->sess, pos->conn, 0, 16, m, AIM_SENDMEMBLOCK_FLAG_ISHASH); 618 627 g_free(pos); 619 } 620 621 static void straight_to_hell(gpointer data, gint source, GaimInputCondition cond) { 628 629 return FALSE; 630 } 631 632 static gboolean straight_to_hell(gpointer data, gint source, b_input_condition cond) { 622 633 struct pieceofcrap *pos = data; 623 634 char buf[BUF_LONG]; … … 629 640 g_free(pos->modname); 630 641 g_free(pos); 631 return ;642 return FALSE; 632 643 } 633 644 … … 638 649 if (pos->modname) 639 650 g_free(pos->modname); 640 pos->inpa = gaim_input_add(pos->fd, GAIM_INPUT_READ, damn_you, pos);641 return ;651 pos->inpa = b_input_add(pos->fd, GAIM_INPUT_READ, damn_you, pos); 652 return FALSE; 642 653 } 643 654 … … 761 772 } 762 773 763 static void oscar_chatnav_connect(gpointer data, gint source, GaimInputCondition cond) {774 static gboolean oscar_chatnav_connect(gpointer data, gint source, b_input_condition cond) { 764 775 struct gaim_connection *gc = data; 765 776 struct oscar_data *odata; … … 769 780 if (!g_slist_find(get_connections(), gc)) { 770 781 closesocket(source); 771 return ;782 return FALSE; 772 783 } 773 784 … … 778 789 if (source < 0) { 779 790 aim_conn_kill(sess, &tstconn); 780 return ;791 return FALSE; 781 792 } 782 793 783 794 aim_conn_completeconnect(sess, tstconn); 784 odata->cnpa = gaim_input_add(tstconn->fd, GAIM_INPUT_READ,795 odata->cnpa = b_input_add(tstconn->fd, GAIM_INPUT_READ, 785 796 oscar_callback, tstconn); 786 } 787 788 static void oscar_auth_connect(gpointer data, gint source, GaimInputCondition cond) 797 798 return FALSE; 799 } 800 801 static gboolean oscar_auth_connect(gpointer data, gint source, b_input_condition cond) 789 802 { 790 803 struct gaim_connection *gc = data; … … 795 808 if (!g_slist_find(get_connections(), gc)) { 796 809 closesocket(source); 797 return ;810 return FALSE; 798 811 } 799 812 … … 804 817 if (source < 0) { 805 818 aim_conn_kill(sess, &tstconn); 806 return ;819 return FALSE; 807 820 } 808 821 809 822 aim_conn_completeconnect(sess, tstconn); 810 odata->paspa = gaim_input_add(tstconn->fd, GAIM_INPUT_READ,823 odata->paspa = b_input_add(tstconn->fd, GAIM_INPUT_READ, 811 824 oscar_callback, tstconn); 812 } 813 814 static void oscar_chat_connect(gpointer data, gint source, GaimInputCondition cond) 825 826 return FALSE; 827 } 828 829 static gboolean oscar_chat_connect(gpointer data, gint source, b_input_condition cond) 815 830 { 816 831 struct chat_connection *ccon = data; … … 825 840 g_free(ccon->name); 826 841 g_free(ccon); 827 return ;842 return FALSE; 828 843 } 829 844 … … 837 852 g_free(ccon->name); 838 853 g_free(ccon); 839 return ;854 return FALSE; 840 855 } 841 856 842 857 aim_conn_completeconnect(sess, ccon->conn); 843 ccon->inpa = gaim_input_add(tstconn->fd,858 ccon->inpa = b_input_add(tstconn->fd, 844 859 GAIM_INPUT_READ, 845 860 oscar_callback, tstconn); 846 861 odata->oscar_chats = g_slist_append(odata->oscar_chats, ccon); 862 863 return FALSE; 847 864 } 848 865 … … 2558 2575 od->oscar_chats = g_slist_remove(od->oscar_chats, cc); 2559 2576 if (cc->inpa > 0) 2560 gaim_input_remove(cc->inpa);2577 b_event_remove(cc->inpa); 2561 2578 aim_conn_kill(od->sess, &cc->conn); 2562 2579 g_free(cc->name);
Note: See TracChangeset
for help on using the changeset viewer.