GNUNET_NETWORK_socket_close (s);
return;
}
- ctx = GNUNET_malloc (sizeof (struct TcpContext));
+ ctx = GNUNET_new (struct TcpContext);
ctx->s = s;
ctx->data = data;
GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_SECONDS, s, &tcp_send, ctx);
GNUNET_GETOPT_OPTION_END
};
+ if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
+ return 2;
+
if (GNUNET_OK !=
GNUNET_PROGRAM_run (argc, argv, "gnunet-nat-server [options] PORT",
_("GNUnet NAT traversal test helper daemon"), options,
&run, NULL))
+ {
+ GNUNET_free ((void*) argv);
return 1;
+ }
+ GNUNET_free ((void*) argv);
return 0;
}