summaryrefslogtreecommitdiff
path: root/src/lib/sockets.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2016-06-28 17:02:42 +0200
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2016-06-28 17:02:42 +0200
commita19521aa74edfa4a2eb62466b04c9264c3b6576c (patch)
tree36b94730d8690c2d131f39b3cc3ff715674f9fcc /src/lib/sockets.c
parentacd29da104d0d8ddace2b2693314542bb5a56fcc (diff)
parent99d19307fae8f1370f52a62aee88fded624ad464 (diff)
downloadouroboros-a19521aa74edfa4a2eb62466b04c9264c3b6576c.tar.gz
ouroboros-a19521aa74edfa4a2eb62466b04c9264c3b6576c.zip
Merged in sandervrijders/ouroboros/be (pull request #144)
lib, irmd, ipcpd: Change of IRM API
Diffstat (limited to 'src/lib/sockets.c')
-rw-r--r--src/lib/sockets.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/sockets.c b/src/lib/sockets.c
index 403d2833..9bfbad5e 100644
--- a/src/lib/sockets.c
+++ b/src/lib/sockets.c
@@ -149,19 +149,19 @@ irm_msg_t * send_recv_irm_msg(irm_msg_t * msg)
}
-char * ipcp_sock_path(pid_t pid)
+char * ipcp_sock_path(pid_t api)
{
char * full_name = NULL;
- char * pid_string = NULL;
+ char * api_string = NULL;
size_t len = 0;
char * delim = "_";
- len = n_digits(pid);
- pid_string = malloc(len + 1);
- if (pid_string == NULL)
+ len = n_digits(api);
+ api_string = malloc(len + 1);
+ if (api_string == NULL)
return NULL;
- sprintf(pid_string, "%d", pid);
+ sprintf(api_string, "%d", api);
len += strlen(IPCP_SOCK_PATH_PREFIX);
len += strlen(delim);
@@ -169,16 +169,16 @@ char * ipcp_sock_path(pid_t pid)
full_name = malloc(len + 1);
if (full_name == NULL) {
- free(pid_string);
+ free(api_string);
return NULL;
}
strcpy(full_name, IPCP_SOCK_PATH_PREFIX);
strcat(full_name, delim);
- strcat(full_name, pid_string);
+ strcat(full_name, api_string);
strcat(full_name, SOCK_PATH_SUFFIX);
- free(pid_string);
+ free(api_string);
return full_name;
}