Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/oscar/oscar.c

    rba9edaa r5aa9551e  
    253253static int msgerrreasonlen = 25;
    254254
    255 static gboolean oscar_callback(gpointer data, gint source,
    256                                 b_input_condition condition) {
     255static void oscar_callback(gpointer data, gint source,
     256                                GaimInputCondition condition) {
    257257        aim_conn_t *conn = (aim_conn_t *)data;
    258258        aim_session_t *sess = aim_conn_getsess(conn);
     
    262262        if (!gc) {
    263263                /* gc is null. we return, else we seg SIGSEG on next line. */
    264                 return FALSE;
     264                return;
    265265        }
    266266     
     
    268268                /* oh boy. this is probably bad. i guess the only thing we
    269269                 * can really do is return? */
    270                 return FALSE;
     270                return;
    271271        }
    272272
     
    288288                                c->conn = NULL;
    289289                                if (c->inpa > 0)
    290                                         b_event_remove(c->inpa);
     290                                        gaim_input_remove(c->inpa);
    291291                                c->inpa = 0;
    292292                                c->fd = -1;
     
    296296                        } else if (conn->type == AIM_CONN_TYPE_CHATNAV) {
    297297                                if (odata->cnpa > 0)
    298                                         b_event_remove(odata->cnpa);
     298                                        gaim_input_remove(odata->cnpa);
    299299                                odata->cnpa = 0;
    300300                                while (odata->create_rooms) {
     
    310310                        } else if (conn->type == AIM_CONN_TYPE_AUTH) {
    311311                                if (odata->paspa > 0)
    312                                         b_event_remove(odata->paspa);
     312                                        gaim_input_remove(odata->paspa);
    313313                                odata->paspa = 0;
    314314                                aim_conn_kill(odata->sess, &conn);
     
    317317                        }
    318318                }
    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
     322static void oscar_login_connect(gpointer data, gint source, GaimInputCondition cond)
    328323{
    329324        struct gaim_connection *gc = data;
     
    334329        if (!g_slist_find(get_connections(), gc)) {
    335330                closesocket(source);
    336                 return FALSE;
     331                return;
    337332        }
    338333
     
    344339                hide_login_progress(gc, _("Couldn't connect to host"));
    345340                signoff(gc);
    346                 return FALSE;
     341                return;
    347342        }
    348343
    349344        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,
    351346                        oscar_callback, conn);
    352        
    353         return FALSE;
    354347}
    355348
     
    419412                struct chat_connection *n = odata->oscar_chats->data;
    420413                if (n->inpa > 0)
    421                         b_event_remove(n->inpa);
     414                        gaim_input_remove(n->inpa);
    422415                g_free(n->name);
    423416                g_free(n->show);
     
    438431                g_free(odata->oldp);
    439432        if (gc->inpa > 0)
    440                 b_event_remove(gc->inpa);
     433                gaim_input_remove(gc->inpa);
    441434        if (odata->cnpa > 0)
    442                 b_event_remove(odata->cnpa);
     435                gaim_input_remove(odata->cnpa);
    443436        if (odata->paspa > 0)
    444                 b_event_remove(odata->paspa);
     437                gaim_input_remove(odata->paspa);
    445438        aim_session_kill(odata->sess);
    446439        g_free(odata->sess);
     
    450443}
    451444
    452 static gboolean oscar_bos_connect(gpointer data, gint source, b_input_condition cond) {
     445static void oscar_bos_connect(gpointer data, gint source, GaimInputCondition cond) {
    453446        struct gaim_connection *gc = data;
    454447        struct oscar_data *odata;
     
    458451        if (!g_slist_find(get_connections(), gc)) {
    459452                closesocket(source);
    460                 return FALSE;
     453                return;
    461454        }
    462455
     
    468461                hide_login_progress(gc, _("Could Not Connect"));
    469462                signoff(gc);
    470                 return FALSE;
     463                return;
    471464        }
    472465
    473466        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,
    475468                        oscar_callback, bosconn);
    476469        set_login_progress(gc, 4, _("Connection established, cookie sent"));
    477        
    478         return FALSE;
    479470}
    480471
     
    579570        }
    580571        aim_sendcookie(sess, bosconn, info->cookie);
    581         b_event_remove(gc->inpa);
     572        gaim_input_remove(gc->inpa);
    582573
    583574        return 1;
     
    594585};
    595586
    596 static gboolean damn_you(gpointer data, gint source, b_input_condition c)
     587static void damn_you(gpointer data, gint source, GaimInputCondition c)
    597588{
    598589        struct pieceofcrap *pos = data;
     
    614605                do_error_dialog(pos->gc, "Gaim was unable to get a valid hash for logging into AIM."
    615606                                " You may be disconnected shortly.", "Login Error");
    616                 b_event_remove(pos->inpa);
     607                gaim_input_remove(pos->inpa);
    617608                closesocket(pos->fd);
    618609                g_free(pos);
    619                 return FALSE;
     610                return;
    620611        }
    621612        /* [WvG] Wheeeee! Who needs error checking anyway? ;-) */
    622613        read(pos->fd, m, 16);
    623614        m[16] = '\0';
    624         b_event_remove(pos->inpa);
     615        gaim_input_remove(pos->inpa);
    625616        closesocket(pos->fd);
    626617        aim_sendmemblock(od->sess, pos->conn, 0, 16, m, AIM_SENDMEMBLOCK_FLAG_ISHASH);
    627618        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
     621static void straight_to_hell(gpointer data, gint source, GaimInputCondition cond) {
    633622        struct pieceofcrap *pos = data;
    634623        char buf[BUF_LONG];
     
    640629                        g_free(pos->modname);
    641630                g_free(pos);
    642                 return FALSE;
     631                return;
    643632        }
    644633
     
    649638        if (pos->modname)
    650639                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;
    653642}
    654643
     
    772761}
    773762
    774 static gboolean oscar_chatnav_connect(gpointer data, gint source, b_input_condition cond) {
     763static void oscar_chatnav_connect(gpointer data, gint source, GaimInputCondition cond) {
    775764        struct gaim_connection *gc = data;
    776765        struct oscar_data *odata;
     
    780769        if (!g_slist_find(get_connections(), gc)) {
    781770                closesocket(source);
    782                 return FALSE;
     771                return;
    783772        }
    784773
     
    789778        if (source < 0) {
    790779                aim_conn_kill(sess, &tstconn);
    791                 return FALSE;
     780                return;
    792781        }
    793782
    794783        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,
    796785                                        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
     788static void oscar_auth_connect(gpointer data, gint source, GaimInputCondition cond)
    802789{
    803790        struct gaim_connection *gc = data;
     
    808795        if (!g_slist_find(get_connections(), gc)) {
    809796                closesocket(source);
    810                 return FALSE;
     797                return;
    811798        }
    812799
     
    817804        if (source < 0) {
    818805                aim_conn_kill(sess, &tstconn);
    819                 return FALSE;
     806                return;
    820807        }
    821808
    822809        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,
    824811                                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
     814static void oscar_chat_connect(gpointer data, gint source, GaimInputCondition cond)
    830815{
    831816        struct chat_connection *ccon = data;
     
    840825                g_free(ccon->name);
    841826                g_free(ccon);
    842                 return FALSE;
     827                return;
    843828        }
    844829
     
    852837                g_free(ccon->name);
    853838                g_free(ccon);
    854                 return FALSE;
     839                return;
    855840        }
    856841
    857842        aim_conn_completeconnect(sess, ccon->conn);
    858         ccon->inpa = b_input_add(tstconn->fd,
     843        ccon->inpa = gaim_input_add(tstconn->fd,
    859844                        GAIM_INPUT_READ,
    860845                        oscar_callback, tstconn);
    861846        odata->oscar_chats = g_slist_append(odata->oscar_chats, ccon);
    862        
    863         return FALSE;
    864847}
    865848
     
    25752558        od->oscar_chats = g_slist_remove(od->oscar_chats, cc);
    25762559        if (cc->inpa > 0)
    2577                 b_event_remove(cc->inpa);
     2560                gaim_input_remove(cc->inpa);
    25782561        aim_conn_kill(od->sess, &cc->conn);
    25792562        g_free(cc->name);
Note: See TracChangeset for help on using the changeset viewer.