fix 1678
[oweals/gnunet.git] / src / nat / upnp-discover.c
index b42df5ff2bc0e962bb91f1fd47dfbb51e973d3b3..2e609d79034038d533274161e547b987ee3a52e3 100644 (file)
@@ -22,7 +22,7 @@
  * Code in this file is originally based on the miniupnp library.
  * Copyright (c) 2005-2009, Thomas BERNARD. All rights reserved.
  *
- * Original licence:
+ * Original license:
  * 
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -70,7 +70,7 @@
 #define DESCRIPTION_BUFSIZE 2048
 #define CURL_EASY_SETOPT(c, a, b) do { ret = curl_easy_setopt(c, a, b); if (ret != CURLE_OK) GNUNET_log(GNUNET_ERROR_TYPE_WARNING, _("%s failed at %s:%d: `%s'\n"), "curl_easy_setopt", __FILE__, __LINE__, curl_easy_strerror(ret)); } while (0)
 #define PRINT_SOCKET_ERROR(a) GNUNET_log_from(GNUNET_ERROR_TYPE_WARNING, "UPnP", _("%s failed at %s:%d: '%s'\n"), a, __FILE__, __LINE__, strerror (errno));
-
+#define PRINT_SOCKET_ERROR_STR(a, b) GNUNET_log_from(GNUNET_ERROR_TYPE_WARNING, "UPnP", _("%s failed at %s:%d: '%s' on `%s'\n"), a, __FILE__, __LINE__, strerror (errno), b);
 
 /**
  * Callback function called when download is finished.
@@ -348,7 +348,7 @@ task_download (void *cls,
  *
  * @param url URL of the file to download
  * @param caller_cb user function to call when done
- * @caller_cls closure to pass to caller_cb
+ * @param caller_cls closure to pass to caller_cb
  */
 void
 download_device_description (char *url, download_cb caller_cb,
@@ -777,7 +777,7 @@ get_valid_igd_connected_cb (char *response, size_t received, void *data)
  * Then, schedule UPnP command to check whether device is connected.
  *
  * @param desc UPnP IGD description (in XML)
- * @data closure from UPNP_discover()
+ * @param data closure from UPNP_discover()
  */
 static void
 get_valid_igd_receive (char *desc, void *data)
@@ -910,11 +910,7 @@ discover_send (void *data, const struct GNUNET_SCHEDULER_TaskContext *tc);
  * and get their descriptions.
  *
  * @param data closure from UPNP_discover()
- * @buf content of the reply
- * @available number of bytes stored in buf
- * @addr address of the sender
- * @addrlen size of addr
- * @param errCode value of errno
+ * @param tc task context
  */
 static void
 discover_recv (void *data, const struct GNUNET_SCHEDULER_TaskContext *tc)
@@ -1208,7 +1204,7 @@ UPNP_discover_ (const char *multicastif,
               if_index = 0;
 #endif
               if (!if_index)
-                PRINT_SOCKET_ERROR ("if_nametoindex");
+                PRINT_SOCKET_ERROR_STR ("if_nametoindex", multicastif);
 
               if (GNUNET_NETWORK_socket_setsockopt
                   (sudp, IPPROTO_IPV6, IPV6_MULTICAST_IF, &if_index,