Changeset 1522faf for protocols/nogaim.c


Ignore:
Timestamp:
2015-04-06T02:26:44Z (9 years ago)
Author:
dequis <dx@…>
Children:
d16e951
Parents:
71f87ba (diff), 69982f8 (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.
git-author:
dequis <dx@…> (06-04-15 02:24:35)
git-committer:
dequis <dx@…> (06-04-15 02:26:44)
Message:

Merge branch 'develop' into feat/hip-cat

Conflicts:

irc_im.c
protocols/jabber/conference.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/nogaim.c

    r71f87ba r1522faf  
    498498};
    499499
    500 static void imcb_ask_auth_cb_no(void *data)
     500static void imcb_ask_cb_free(void *data)
    501501{
    502502        struct imcb_ask_cb_data *cbd = data;
    503 
    504         cbd->ic->acc->prpl->auth_deny(cbd->ic, cbd->handle);
    505503
    506504        g_free(cbd->handle);
     
    508506}
    509507
     508static void imcb_ask_auth_cb_no(void *data)
     509{
     510        struct imcb_ask_cb_data *cbd = data;
     511
     512        cbd->ic->acc->prpl->auth_deny(cbd->ic, cbd->handle);
     513
     514        imcb_ask_cb_free(cbd);
     515}
     516
    510517static void imcb_ask_auth_cb_yes(void *data)
    511518{
     
    514521        cbd->ic->acc->prpl->auth_allow(cbd->ic, cbd->handle);
    515522
    516         g_free(cbd->handle);
    517         g_free(cbd);
     523        imcb_ask_cb_free(cbd);
    518524}
    519525
     
    535541        data->handle = g_strdup(handle);
    536542        query_add((irc_t *) ic->bee->ui_data, ic, s,
    537                   imcb_ask_auth_cb_yes, imcb_ask_auth_cb_no, g_free, data);
    538 }
    539 
    540 
    541 static void imcb_ask_add_cb_no(void *data)
    542 {
    543         g_free(((struct imcb_ask_cb_data*) data)->handle);
    544         g_free(data);
     543                  imcb_ask_auth_cb_yes, imcb_ask_auth_cb_no, imcb_ask_cb_free, data);
     544
     545        g_free(s);
    545546}
    546547
     
    551552        cbd->ic->acc->prpl->add_buddy(cbd->ic, cbd->handle, NULL);
    552553
    553         imcb_ask_add_cb_no(data);
     554        imcb_ask_cb_free(data);
    554555}
    555556
    556557void imcb_ask_add(struct im_connection *ic, const char *handle, const char *realname)
    557558{
    558         struct imcb_ask_cb_data *data = g_new0(struct imcb_ask_cb_data, 1);
     559        struct imcb_ask_cb_data *data;
    559560        char *s;
    560561
     
    564565        }
    565566
     567        data = g_new0(struct imcb_ask_cb_data, 1);
     568
    566569        s = g_strdup_printf("The user %s is not in your buddy list yet. Do you want to add him/her now?", handle);
    567570
     
    569572        data->handle = g_strdup(handle);
    570573        query_add((irc_t *) ic->bee->ui_data, ic, s,
    571                   imcb_ask_add_cb_yes, imcb_ask_add_cb_no, g_free, data);
     574                  imcb_ask_add_cb_yes, imcb_ask_cb_free, imcb_ask_cb_free, data);
     575
     576        g_free(s);
    572577}
    573578
Note: See TracChangeset for help on using the changeset viewer.