aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ctrl/libhicnctrl/src/api.c12
-rw-r--r--hicn-light/src/hicn/config/configuration.c2
2 files changed, 12 insertions, 2 deletions
diff --git a/ctrl/libhicnctrl/src/api.c b/ctrl/libhicnctrl/src/api.c
index b836ef800..9fb923d13 100644
--- a/ctrl/libhicnctrl/src/api.c
+++ b/ctrl/libhicnctrl/src/api.c
@@ -26,6 +26,12 @@
#include <sys/socket.h> // socket
#include <unistd.h> // close, fcntl
#include <fcntl.h> // fcntl
+#include <sys/types.h> // getpid
+#include <unistd.h> // getpid
+#ifdef __linux__
+#include <sys/syscall.h>
+#define gettid() syscall(SYS_gettid)
+#endif /* __linux__ */
#include <hicn/ctrl/api.h>
#include <hicn/ctrl/commands.h>
@@ -435,7 +441,11 @@ hc_sock_parse_url(const char * url, struct sockaddr * sa)
/* FIXME URL parsing is currently not implemented */
assert(!url);
- srand(time(NULL));
+#ifdef __linux__
+ srand(time(NULL) ^ getpid() ^ gettid());
+#else
+ srand(time(NULL) ^ getpid());
+#endif /* __linux__ */
/*
* A temporary solution is to inspect the sa_family fields of the passed in
diff --git a/hicn-light/src/hicn/config/configuration.c b/hicn-light/src/hicn/config/configuration.c
index 52dbf7a47..e41fb3e45 100644
--- a/hicn-light/src/hicn/config/configuration.c
+++ b/hicn-light/src/hicn/config/configuration.c
@@ -364,7 +364,7 @@ struct iovec *configuration_ProcessCreateTunnel(Configuration *config,
if (symbolicNameTable_Exists(config->symbolicNameTable, symbolicName)) {
logger_Log(config->logger, LoggerFacility_Config, PARCLogLevel_Error,
- __func__, "Listener symbolic name already exists");
+ __func__, "Connection symbolic name already exists");
goto ERR;
}