[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated: set type correctly in nat a
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated: set type correctly in nat auto test |
Date: |
Thu, 16 Feb 2017 15:07:43 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 9d242f845 set type correctly in nat auto test
9d242f845 is described below
commit 9d242f845845ec564b65f4faac080f8483c6b8c2
Author: Christian Grothoff <address@hidden>
AuthorDate: Thu Feb 16 15:08:42 2017 +0100
set type correctly in nat auto test
---
src/nat-auto/nat_auto_api.c | 6 +++---
src/nat-auto/nat_auto_api_test.c | 18 ++++++++++--------
2 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/src/nat-auto/nat_auto_api.c b/src/nat-auto/nat_auto_api.c
index a5b41ac49..6660239c3 100644
--- a/src/nat-auto/nat_auto_api.c
+++ b/src/nat-auto/nat_auto_api.c
@@ -42,7 +42,7 @@ struct GNUNET_NAT_AUTO_AutoHandle
* Configuration we use.
*/
const struct GNUNET_CONFIGURATION_Handle *cfg;
-
+
/**
* Message queue for communicating with the NAT service.
*/
@@ -206,8 +206,8 @@ ah_error_handler (void *cls,
*/
struct GNUNET_NAT_AUTO_AutoHandle *
GNUNET_NAT_AUTO_autoconfig_start (const struct GNUNET_CONFIGURATION_Handle
*cfg,
- GNUNET_NAT_AUTO_AutoResultCallback cb,
- void *cb_cls)
+ GNUNET_NAT_AUTO_AutoResultCallback cb,
+ void *cb_cls)
{
struct GNUNET_NAT_AUTO_AutoHandle *ah = GNUNET_new (struct
GNUNET_NAT_AUTO_AutoHandle);
struct GNUNET_MQ_MessageHandler handlers[] = {
diff --git a/src/nat-auto/nat_auto_api_test.c b/src/nat-auto/nat_auto_api_test.c
index fb2bcd679..dda0a3b41 100644
--- a/src/nat-auto/nat_auto_api_test.c
+++ b/src/nat-auto/nat_auto_api_test.c
@@ -28,7 +28,7 @@
#include "gnunet_nat_auto_service.h"
#include "nat-auto.h"
-#define LOG(kind,...) GNUNET_log_from (kind, "nat", __VA_ARGS__)
+#define LOG(kind,...) GNUNET_log_from (kind, "nat-auto", __VA_ARGS__)
#define NAT_SERVER_TIMEOUT GNUNET_TIME_relative_multiply
(GNUNET_TIME_UNIT_SECONDS, 30)
@@ -508,19 +508,21 @@ GNUNET_NAT_AUTO_test_start (const struct
GNUNET_CONFIGURATION_Handle *cfg,
{
nh->lsock
= GNUNET_NETWORK_socket_create (AF_INET,
- proto,
- 0);
+ (IPPROTO_UDP == proto)
+ ? SOCK_DGRAM
+ : SOCK_STREAM,
+ proto);
if ( (NULL == nh->lsock) ||
(GNUNET_OK !=
GNUNET_NETWORK_socket_bind (nh->lsock,
(const struct sockaddr *) &sa,
sizeof (sa))))
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- _("Failed to create listen socket bound to `%s' for NAT
test: %s\n"),
- GNUNET_a2s ((const struct sockaddr *) &sa,
- sizeof (sa)),
- STRERROR (errno));
+ LOG (GNUNET_ERROR_TYPE_ERROR,
+ _("Failed to create socket bound to `%s' for NAT test: %s\n"),
+ GNUNET_a2s ((const struct sockaddr *) &sa,
+ sizeof (sa)),
+ STRERROR (errno));
if (NULL != nh->lsock)
{
GNUNET_NETWORK_socket_close (nh->lsock);
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [gnunet] branch master updated: set type correctly in nat auto test,
gnunet <=