aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-07-11 12:03:01 +0200
committerMattias Andrée <maandree@kth.se>2016-07-11 12:03:01 +0200
commite48937e99de79f2a6c0666983b9289b3d86b345a (patch)
treee0b5a200b549c5e776ca034fd34d695ffa230710 /src
parentwhitespace (diff)
downloadcoopgammad-e48937e99de79f2a6c0666983b9289b3d86b345a.tar.gz
coopgammad-e48937e99de79f2a6c0666983b9289b3d86b345a.tar.bz2
coopgammad-e48937e99de79f2a6c0666983b9289b3d86b345a.tar.xz
Add .socket suffix to the socket
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--src/gammad.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gammad.c b/src/gammad.c
index 43c3586..17cd900 100644
--- a/src/gammad.c
+++ b/src/gammad.c
@@ -94,11 +94,11 @@ static char* get_socket_pathname(libgamma_site_state_t* site)
if ((pw = getpwuid(getuid())))
username = pw->pw_name ? pw->pw_name : "";
- n = sizeof("%s/.gammad/~%s/%i%s%s") + 3 * sizeof(int);
+ n = sizeof("%s/.gammad/~%s/%i%s%s.socket") + 3 * sizeof(int);
n += strlen(rundir) + strlen(username) + strlen(name);
if (!(rc = malloc(n)))
goto fail;
- sprintf(rc, "%s/.gammad/~%s/%i%s%s",
+ sprintf(rc, "%s/.gammad/~%s/%i%s%s.socket",
rundir, username, site->method, name ? "." : "", name ? name : "");
return rc;