src/protocols/jabber/si.c

changeset 9030
7b574a641391
parent 8838
c23227da7b4a
child 9466
b6425eab60ca
equal deleted inserted replaced
9029:4670ebf1c180 9030:7b574a641391
16 * You should have received a copy of the GNU General Public License 16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software 17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 * 19 *
20 */ 20 */
21
22 #include "blist.h"
23
21 #include "internal.h" 24 #include "internal.h"
22 #include "debug.h" 25 #include "debug.h"
23 #include "ft.h" 26 #include "ft.h"
24 #include "network.h" 27 #include "network.h"
25 #include "notify.h" 28 #include "notify.h"
639 642
640 jabber_iq_send(iq); 643 jabber_iq_send(iq);
641 } 644 }
642 } 645 }
643 646
644 void jabber_si_xfer_ask_send(GaimConnection *gc, const char *name) 647 void jabber_si_xfer_ask_send(GaimBlistNode *node, gpointer data)
645 { 648 {
646 JabberStream *js = gc->proto_data; 649 GaimBuddy *buddy;
650 GaimConnection *gc;
651 JabberStream *js;
652
647 GaimXfer *xfer; 653 GaimXfer *xfer;
648 JabberSIXfer *jsx; 654 JabberSIXfer *jsx;
649 655
650 if(!gaim_find_buddy(gc->account, name) || !jabber_buddy_find(js, name, FALSE)) 656 g_return_if_fail(GAIM_BLIST_NODE_IS_BUDDY(node));
651 return; 657
652 658 buddy = (GaimBuddy *) node;
653 xfer = gaim_xfer_new(gaim_connection_get_account(gc), GAIM_XFER_SEND, name); 659 gc = gaim_account_get_connection(buddy->account);
660 js = gc->proto_data;
661
662 if(!gaim_find_buddy(gc->account, buddy->name) || !jabber_buddy_find(js, buddy->name, FALSE))
663 return;
664
665 xfer = gaim_xfer_new(buddy->account, GAIM_XFER_SEND, buddy->name);
654 666
655 xfer->data = jsx = g_new0(JabberSIXfer, 1); 667 xfer->data = jsx = g_new0(JabberSIXfer, 1);
656 jsx->js = js; 668 jsx->js = js;
657 669
658 gaim_xfer_set_init_fnc(xfer, jabber_si_xfer_init); 670 gaim_xfer_set_init_fnc(xfer, jabber_si_xfer_init);

mercurial