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