Mercurial > pidgin
comparison libpurple/upnp.c @ 29274:e0e0cecdcd16
propagate from branch 'im.pidgin.pidgin' (head 53ec2e73334e6dc99c29f0f13b5ebf4700f5a92c)
to branch 'im.pidgin.cpw.attention_ui' (head 2ce3177a8ec94edba0f242ea181a9bd0f2655751)
author | Marcus Lundblad <ml@update.uu.se> |
---|---|
date | Tue, 24 Feb 2009 20:26:34 +0000 |
parents | 9c96fb57632d |
children | 4b8c4870b13a |
comparison
equal
deleted
inserted
replaced
29273:4460eab56456 | 29274:e0e0cecdcd16 |
---|---|
565 | 565 |
566 static void | 566 static void |
567 purple_upnp_discover_send_broadcast(UPnPDiscoveryData *dd) | 567 purple_upnp_discover_send_broadcast(UPnPDiscoveryData *dd) |
568 { | 568 { |
569 gchar *sendMessage = NULL; | 569 gchar *sendMessage = NULL; |
570 gsize totalSize; | 570 size_t totalSize; |
571 gboolean sentSuccess; | 571 gboolean sentSuccess; |
572 | 572 |
573 /* because we are sending over UDP, if there is a failure | 573 /* because we are sending over UDP, if there is a failure |
574 we should retry the send NUM_UDP_ATTEMPTS times. Also, | 574 we should retry the send NUM_UDP_ATTEMPTS times. Also, |
575 try different requests for WANIPConnection and WANPPPConnection*/ | 575 try different requests for WANIPConnection and WANPPPConnection*/ |
691 purple_debug_error("upnp", | 691 purple_debug_error("upnp", |
692 "generate_action_message_and_send(): Failed In Parse URL\n"); | 692 "generate_action_message_and_send(): Failed In Parse URL\n"); |
693 /* XXX: This should probably be async */ | 693 /* XXX: This should probably be async */ |
694 if(cb) | 694 if(cb) |
695 cb(NULL, cb_data, NULL, 0, NULL); | 695 cb(NULL, cb_data, NULL, 0, NULL); |
696 return NULL; | |
696 } | 697 } |
697 if(port == 0 || port == -1) { | 698 if(port == 0 || port == -1) { |
698 port = DEFAULT_HTTP_PORT; | 699 port = DEFAULT_HTTP_PORT; |
699 } | 700 } |
700 | 701 |
709 strlen(soapMessage), soapMessage); | 710 strlen(soapMessage), soapMessage); |
710 g_free(pathOfControl); | 711 g_free(pathOfControl); |
711 g_free(soapMessage); | 712 g_free(soapMessage); |
712 | 713 |
713 gfud = purple_util_fetch_url_request_len(control_info.control_url, FALSE, NULL, TRUE, | 714 gfud = purple_util_fetch_url_request_len(control_info.control_url, FALSE, NULL, TRUE, |
714 totalSendMessage, TRUE, MAX_UPNP_DOWNLOAD, cb, cb_data); | 715 totalSendMessage, TRUE, MAX_UPNP_DOWNLOAD, cb, cb_data); |
715 | 716 |
716 g_free(totalSendMessage); | 717 g_free(totalSendMessage); |
717 g_free(addressOfControl); | 718 g_free(addressOfControl); |
718 | 719 |
719 return gfud; | 720 return gfud; |
720 } | 721 } |
721 | 722 |
722 const gchar * | 723 const gchar * |
723 purple_upnp_get_public_ip() | 724 purple_upnp_get_public_ip() |