check
[oweals/gnunet.git] / src / nat / upnp.c
index 4435741a0b6bbc85b133a9171fa375e9a3a0456c..45c7df41994220a3914802684b7400e3e727bb8d 100644 (file)
@@ -67,7 +67,7 @@ struct GNUNET_NAT_UPNP_Handle
   unsigned int is_mapped;
   enum UPNP_State state;
   struct sockaddr *ext_addr;
-  const char *iface;
+  char *iface;
   int processing;
   GNUNET_NAT_UPNP_pulse_cb pulse_cb;
   void *pulse_cls;
@@ -79,10 +79,10 @@ process_if (void *cls,
             int isDefault, const struct sockaddr *addr, socklen_t addrlen)
 {
   struct GNUNET_NAT_UPNP_Handle *upnp = cls;
-
+  GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "UPNP found if `%s'\n", name);
   if (addr && GNUNET_NAT_cmp_addr (upnp->addr, addr) == 0)
     {
-      upnp->iface = name;       // BADNESS!
+      upnp->iface = GNUNET_strdup(name);       // BADNESS!
       return GNUNET_SYSERR;
     }
 
@@ -338,9 +338,7 @@ get_ip_address_cb (int error, char *ext_addr, void *cls)
  * 
  * @param handle the handle for UPnP object
  * @param is_enabled whether enable port redirection
- * @param doPortCheck FIXME
- * @param ext_addr pointer for returning external IP address.
- *     Will be set to NULL if address could not be found. Don't free the sockaddr.
+ * @param doPortCheck do port check
  */
 void
 GNUNET_NAT_UPNP_pulse (struct GNUNET_NAT_UPNP_Handle *handle,