Changeset b1dc403 for protocols/nogaim.c


Ignore:
Timestamp:
2015-05-04T21:58:50Z (9 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Children:
5726a0d
Parents:
531eabd (diff), 5ca1416 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Catch up with master.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/nogaim.c

    r531eabd rb1dc403  
    503503};
    504504
    505 static void imcb_ask_auth_cb_no(void *data)
     505static void imcb_ask_cb_free(void *data)
    506506{
    507507        struct imcb_ask_cb_data *cbd = data;
    508 
    509         cbd->ic->acc->prpl->auth_deny(cbd->ic, cbd->handle);
    510508
    511509        g_free(cbd->handle);
     
    513511}
    514512
     513static void imcb_ask_auth_cb_no(void *data)
     514{
     515        struct imcb_ask_cb_data *cbd = data;
     516
     517        cbd->ic->acc->prpl->auth_deny(cbd->ic, cbd->handle);
     518
     519        imcb_ask_cb_free(cbd);
     520}
     521
    515522static void imcb_ask_auth_cb_yes(void *data)
    516523{
     
    519526        cbd->ic->acc->prpl->auth_allow(cbd->ic, cbd->handle);
    520527
    521         g_free(cbd->handle);
    522         g_free(cbd);
     528        imcb_ask_cb_free(cbd);
    523529}
    524530
     
    540546        data->handle = g_strdup(handle);
    541547        query_add((irc_t *) ic->bee->ui_data, ic, s,
    542                   imcb_ask_auth_cb_yes, imcb_ask_auth_cb_no, g_free, data);
    543 }
    544 
    545 
    546 static void imcb_ask_add_cb_no(void *data)
    547 {
    548         g_free(((struct imcb_ask_cb_data*) data)->handle);
    549         g_free(data);
     548                  imcb_ask_auth_cb_yes, imcb_ask_auth_cb_no, imcb_ask_cb_free, data);
     549
     550        g_free(s);
    550551}
    551552
     
    556557        cbd->ic->acc->prpl->add_buddy(cbd->ic, cbd->handle, NULL);
    557558
    558         imcb_ask_add_cb_no(data);
     559        imcb_ask_cb_free(data);
    559560}
    560561
    561562void imcb_ask_add(struct im_connection *ic, const char *handle, const char *realname)
    562563{
    563         struct imcb_ask_cb_data *data = g_new0(struct imcb_ask_cb_data, 1);
     564        struct imcb_ask_cb_data *data;
    564565        char *s;
    565566
     
    569570        }
    570571
     572        data = g_new0(struct imcb_ask_cb_data, 1);
     573
    571574        s = g_strdup_printf("The user %s is not in your buddy list yet. Do you want to add him/her now?", handle);
    572575
     
    574577        data->handle = g_strdup(handle);
    575578        query_add((irc_t *) ic->bee->ui_data, ic, s,
    576                   imcb_ask_add_cb_yes, imcb_ask_add_cb_no, g_free, data);
     579                  imcb_ask_add_cb_yes, imcb_ask_cb_free, imcb_ask_cb_free, data);
     580
     581        g_free(s);
    577582}
    578583
Note: See TracChangeset for help on using the changeset viewer.