Changeset b1dc403 for protocols/nogaim.c
- Timestamp:
- 2015-05-04T21:58:50Z (9 years ago)
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/nogaim.c
r531eabd rb1dc403 503 503 }; 504 504 505 static void imcb_ask_ auth_cb_no(void *data)505 static void imcb_ask_cb_free(void *data) 506 506 { 507 507 struct imcb_ask_cb_data *cbd = data; 508 509 cbd->ic->acc->prpl->auth_deny(cbd->ic, cbd->handle);510 508 511 509 g_free(cbd->handle); … … 513 511 } 514 512 513 static 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 515 522 static void imcb_ask_auth_cb_yes(void *data) 516 523 { … … 519 526 cbd->ic->acc->prpl->auth_allow(cbd->ic, cbd->handle); 520 527 521 g_free(cbd->handle); 522 g_free(cbd); 528 imcb_ask_cb_free(cbd); 523 529 } 524 530 … … 540 546 data->handle = g_strdup(handle); 541 547 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); 550 551 } 551 552 … … 556 557 cbd->ic->acc->prpl->add_buddy(cbd->ic, cbd->handle, NULL); 557 558 558 imcb_ask_ add_cb_no(data);559 imcb_ask_cb_free(data); 559 560 } 560 561 561 562 void imcb_ask_add(struct im_connection *ic, const char *handle, const char *realname) 562 563 { 563 struct imcb_ask_cb_data *data = g_new0(struct imcb_ask_cb_data, 1);564 struct imcb_ask_cb_data *data; 564 565 char *s; 565 566 … … 569 570 } 570 571 572 data = g_new0(struct imcb_ask_cb_data, 1); 573 571 574 s = g_strdup_printf("The user %s is not in your buddy list yet. Do you want to add him/her now?", handle); 572 575 … … 574 577 data->handle = g_strdup(handle); 575 578 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); 577 582 } 578 583
Note: See TracChangeset
for help on using the changeset viewer.