fail more gracefully
[oweals/gnunet.git] / src / upnp / upnp.c
index 6dc4338a0b60bd86191ac3b06873feb2debdbfb9..5e15b12b44e11343e6baa0ccfc27a8c11f5faec4 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * @file upnp.c UPnP Implementation
+ * @file upnp/upnp.c UPnP Implementation
  * @ingroup core
  *
  * gaim
@@ -104,7 +104,7 @@ typedef struct
   char *full_url;
   char *buf;
   unsigned int buf_len;
-  int sock;
+  struct GNUNET_NETWORK_Handle *sock;
 } UPnPDiscoveryData;
 
 static GaimUPnPControlInfo control_info = {
@@ -543,7 +543,7 @@ gaim_upnp_parse_description (char *proxy, UPnPDiscoveryData * dd)
 }
 
 int
-gaim_upnp_discover (struct GNUNET_CONFIGURATION_Handle *cfg, int sock)
+gaim_upnp_discover (struct GNUNET_CONFIGURATION_Handle *cfg, struct GNUNET_NETWORK_Handle *sock)
 {
   char *proxy;
   socklen_t avail;
@@ -613,7 +613,7 @@ gaim_upnp_discover (struct GNUNET_CONFIGURATION_Handle *cfg, int sock)
   /* try to read response */
   do
     {
-      buf_len = recv (dd.sock, buf, sizeof (buf) - 1, 0);
+      buf_len = GNUNET_IO_recv (dd.sock, buf, sizeof (buf) - 1, 0);
       if (buf_len > 0)
         {
           buf[buf_len] = '\0';