summaryrefslogtreecommitdiff
path: root/src/lib/sockets.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2016-06-20 21:58:17 +0200
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2016-06-20 21:58:17 +0200
commit34f96731f5fb8ab8a1f7018366fc28fd041d73e2 (patch)
treeaff0b0ed3474c7cdb5f6ba7e62ca5e33ccedb814 /src/lib/sockets.c
parent6270143e57306d11be5c02ee3c7857808583c0f5 (diff)
parent550cfa775b048abe183c4fdcc8ada8476e562185 (diff)
downloadouroboros-34f96731f5fb8ab8a1f7018366fc28fd041d73e2.tar.gz
ouroboros-34f96731f5fb8ab8a1f7018366fc28fd041d73e2.zip
Merged in sandervrijders/ouroboros/be (pull request #134)
build: Change install directories and set correct permissions
Diffstat (limited to 'src/lib/sockets.c')
-rw-r--r--src/lib/sockets.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/sockets.c b/src/lib/sockets.c
index 6c51e916..403d2833 100644
--- a/src/lib/sockets.c
+++ b/src/lib/sockets.c
@@ -22,6 +22,7 @@
#define OUROBOROS_PREFIX "libouroboros-sockets"
+#include <ouroboros/config.h>
#include <ouroboros/logs.h>
#include <ouroboros/common.h>
#include <ouroboros/sockets.h>
@@ -153,7 +154,7 @@ char * ipcp_sock_path(pid_t pid)
char * full_name = NULL;
char * pid_string = NULL;
size_t len = 0;
- char * delim = "-";
+ char * delim = "_";
len = n_digits(pid);
pid_string = malloc(len + 1);
@@ -164,6 +165,8 @@ char * ipcp_sock_path(pid_t pid)
len += strlen(IPCP_SOCK_PATH_PREFIX);
len += strlen(delim);
+ len += strlen(SOCK_PATH_SUFFIX);
+
full_name = malloc(len + 1);
if (full_name == NULL) {
free(pid_string);
@@ -173,6 +176,7 @@ char * ipcp_sock_path(pid_t pid)
strcpy(full_name, IPCP_SOCK_PATH_PREFIX);
strcat(full_name, delim);
strcat(full_name, pid_string);
+ strcat(full_name, SOCK_PATH_SUFFIX);
free(pid_string);