comparison libpurple/protocols/oscar/peer.c @ 27680:4e1eef14b095

Add some debugging for a file transfer crash. Refs #4829. The crash is happening because something in inner_tlvlist in aim_im_sendch2_sendfile_requestdirect is NULL, which then causes aim_tlvlist_write to call byte_stream_putraw on a NULL pointer (length is greater than 0, so aim_tlvlist_write assumes there is something there). I don't see *why*, but I think this will "fix" it.
author Paul Aurich <paul@darkrain42.org>
date Sat, 18 Jul 2009 04:06:48 +0000
parents 01f1929d0936
children 993483dda1b8
comparison
equal deleted inserted replaced
27679:0ec880685f5f 27680:4e1eef14b095
708 purple_conversation_write(conv, NULL, tmp, PURPLE_MESSAGE_SYSTEM, time(NULL)); 708 purple_conversation_write(conv, NULL, tmp, PURPLE_MESSAGE_SYSTEM, time(NULL));
709 g_free(tmp); 709 g_free(tmp);
710 } 710 }
711 else if (conn->type == OSCAR_CAPABILITY_SENDFILE) 711 else if (conn->type == OSCAR_CAPABILITY_SENDFILE)
712 { 712 {
713 const guchar *ip_atoi = purple_network_ip_atoi(listener_ip);
714 if (ip_atoi == NULL) {
715 purple_debug_error("oscar", "Cannot send file. IP %s failed atoi.\n"
716 "Other possibly useful information: fd = %d, port = %d\n",
717 listener_ip ? listener_ip : "(null!)", conn->listenerfd,
718 listener_port);
719 purple_xfer_cancel_local(conn->xfer);
720 return;
721 }
713 aim_im_sendch2_sendfile_requestdirect(od, 722 aim_im_sendch2_sendfile_requestdirect(od,
714 conn->cookie, conn->bn, 723 conn->cookie, conn->bn,
715 purple_network_ip_atoi(listener_ip), 724 ip_atoi,
716 listener_port, ++conn->lastrequestnumber, 725 listener_port, ++conn->lastrequestnumber,
717 (const gchar *)conn->xferdata.name, 726 (const gchar *)conn->xferdata.name,
718 conn->xferdata.size, conn->xferdata.totfiles); 727 conn->xferdata.size, conn->xferdata.totfiles);
719 } 728 }
720 } 729 }