Changes in protocols/nogaim.c [098a75b:66aefeb]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/nogaim.c
r098a75b r66aefeb 132 132 extern void twitter_initmodule(); 133 133 extern void purple_initmodule(); 134 extern void rpc_initmodule(); 134 135 135 136 #ifdef WITH_MSN … … 155 156 #ifdef WITH_PURPLE 156 157 purple_initmodule(); 158 #endif 159 160 #ifdef WITH_RPC 161 rpc_initmodule(); 157 162 #endif 158 163 … … 498 503 }; 499 504 500 static void imcb_ask_ cb_free(void *data)505 static void imcb_ask_auth_cb_no(void *data) 501 506 { 502 507 struct imcb_ask_cb_data *cbd = data; 508 509 cbd->ic->acc->prpl->auth_deny(cbd->ic, cbd->handle); 503 510 504 511 g_free(cbd->handle); … … 506 513 } 507 514 508 static void imcb_ask_auth_cb_ no(void *data)515 static void imcb_ask_auth_cb_yes(void *data) 509 516 { 510 517 struct imcb_ask_cb_data *cbd = data; 511 518 512 cbd->ic->acc->prpl->auth_deny(cbd->ic, cbd->handle);513 514 imcb_ask_cb_free(cbd);515 }516 517 static void imcb_ask_auth_cb_yes(void *data)518 {519 struct imcb_ask_cb_data *cbd = data;520 521 519 cbd->ic->acc->prpl->auth_allow(cbd->ic, cbd->handle); 522 520 523 imcb_ask_cb_free(cbd); 521 g_free(cbd->handle); 522 g_free(cbd); 524 523 } 525 524 … … 541 540 data->handle = g_strdup(handle); 542 541 query_add((irc_t *) ic->bee->ui_data, ic, s, 543 imcb_ask_auth_cb_yes, imcb_ask_auth_cb_no, imcb_ask_cb_free, data); 544 545 g_free(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); 546 550 } 547 551 … … 552 556 cbd->ic->acc->prpl->add_buddy(cbd->ic, cbd->handle, NULL); 553 557 554 imcb_ask_ cb_free(data);558 imcb_ask_add_cb_no(data); 555 559 } 556 560 557 561 void imcb_ask_add(struct im_connection *ic, const char *handle, const char *realname) 558 562 { 559 struct imcb_ask_cb_data *data ;563 struct imcb_ask_cb_data *data = g_new0(struct imcb_ask_cb_data, 1); 560 564 char *s; 561 565 … … 565 569 } 566 570 567 data = g_new0(struct imcb_ask_cb_data, 1);568 569 571 s = g_strdup_printf("The user %s is not in your buddy list yet. Do you want to add him/her now?", handle); 570 572 … … 572 574 data->handle = g_strdup(handle); 573 575 query_add((irc_t *) ic->bee->ui_data, ic, s, 574 imcb_ask_add_cb_yes, imcb_ask_cb_free, imcb_ask_cb_free, data); 575 576 g_free(s); 576 imcb_ask_add_cb_yes, imcb_ask_add_cb_no, g_free, data); 577 577 } 578 578
Note: See TracChangeset
for help on using the changeset viewer.