- added check against statistics
[oweals/gnunet.git] / src / nat / nat_mini.c
index 5a83d7a4fea22e7dd4ce3b013d9d7aee494175b0..84cc841867bd254781772079e4cad653711fd30b 100644 (file)
@@ -169,14 +169,14 @@ GNUNET_NAT_mini_get_external_ipv4 (struct GNUNET_TIME_Relative timeout,
   eh = GNUNET_malloc (sizeof (struct GNUNET_NAT_ExternalHandle));
   eh->cb = cb;
   eh->cb_cls = cb_cls;
-  eh->opipe = GNUNET_DISK_pipe (GNUNET_YES, GNUNET_NO, GNUNET_YES);
+  eh->opipe = GNUNET_DISK_pipe (GNUNET_YES, GNUNET_YES, GNUNET_NO, GNUNET_YES);
   if (NULL == eh->opipe)
   {
     GNUNET_free (eh);
     return NULL;
   }
   eh->eip =
-      GNUNET_OS_start_process (NULL, eh->opipe, "external-ip", "external-ip",
+    GNUNET_OS_start_process (GNUNET_NO, NULL, eh->opipe, "external-ip", "external-ip",
                                NULL);
   if (NULL == eh->eip)
   {
@@ -378,7 +378,7 @@ process_refresh_output (void *cls, const char *line)
   if (NULL == strstr (s, pstr))
     return;                     /* skip */
   if (1 !=
-      sscanf (line,
+      SSCANF (line,
               (mini->is_tcp) ? "%*u TCP  %u->%*s:%*u %*s" :
               "%*u UDP  %u->%*s:%*u %*s", &nport))
     return;                     /* skip */
@@ -446,7 +446,7 @@ process_map_output (void *cls, const char *line)
    */
   if ((NULL == (ipaddr = strstr (line, " "))) ||
       (NULL == (pstr = strstr (ipaddr, ":"))) ||
-      (1 != sscanf (pstr + 1, "%u", &port)))
+      (1 != SSCANF (pstr + 1, "%u", &port)))
   {
     return;                     /* skip line */
   }