diff options
author | Dimitri Staessens <[email protected]> | 2017-12-02 14:01:03 +0100 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2017-12-02 14:56:20 +0100 |
commit | 9b8a3e11c558877c09416991ff1ec840fea6d0ab (patch) | |
tree | f2faf7a4ab45687782a010fb6e48829e8ee1bdeb /src/lib/sockets.c | |
parent | f43e5e2329fb798047d15dd0748e5eef3359c966 (diff) | |
download | ouroboros-9b8a3e11c558877c09416991ff1ec840fea6d0ab.tar.gz ouroboros-9b8a3e11c558877c09416991ff1ec840fea6d0ab.zip |
lib, tools: Rename application process and instance
This refactors ouroboros to use "program" instead of "application
process" and "process" instead of "application process instance" to
align with current naming in current Operating Systems courses instead
of the ISO nomenclature adopted by RINA. This change permeates through
the entire implementation. Also contains some minor other refactors.
Signed-off-by: Dimitri Staessens <[email protected]>
Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'src/lib/sockets.c')
-rw-r--r-- | src/lib/sockets.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/sockets.c b/src/lib/sockets.c index 42676d11..d811a826 100644 --- a/src/lib/sockets.c +++ b/src/lib/sockets.c @@ -125,19 +125,19 @@ irm_msg_t * send_recv_irm_msg(irm_msg_t * msg) return recv_msg; } -char * ipcp_sock_path(pid_t api) +char * ipcp_sock_path(pid_t pid) { char * full_name = NULL; - char * api_string = NULL; + char * pid_string = NULL; size_t len = 0; char * delim = "_"; - len = n_digits(api); - api_string = malloc(len + 1); - if (api_string == NULL) + len = n_digits(pid); + pid_string = malloc(len + 1); + if (pid_string == NULL) return NULL; - sprintf(api_string, "%d", api); + sprintf(pid_string, "%d", pid); len += strlen(IPCP_SOCK_PATH_PREFIX); len += strlen(delim); @@ -145,16 +145,16 @@ char * ipcp_sock_path(pid_t api) full_name = malloc(len + 1); if (full_name == NULL) { - free(api_string); + free(pid_string); return NULL; } strcpy(full_name, IPCP_SOCK_PATH_PREFIX); strcat(full_name, delim); - strcat(full_name, api_string); + strcat(full_name, pid_string); strcat(full_name, SOCK_PATH_SUFFIX); - free(api_string); + free(pid_string); return full_name; } |