diff options
author | 2010-07-28 11:51:41 +0200 | |
---|---|---|
committer | 2010-07-28 11:51:41 +0200 | |
commit | 4fc8d5ead565c1b4e45eac93fba26ddb3b8566b4 (patch) | |
tree | 0c6eed66f2aca1755f9a218f5ff8967acf1cc8bc /main.c | |
parent | 514156edddceaa3fad523c2d46bc9ac1e00b6624 (diff) | |
parent | bfce294151a589c1d91d982d78eba47d16158713 (diff) |
Merge branch 'devel' into actions
Conflicts:
plugins/hotkeys/hotkeys.c
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -270,7 +270,8 @@ server_start (void) { memcpy (srv_local.sun_path, server_id, sizeof (server_id)); int len = offsetof(struct sockaddr_un, sun_path) + sizeof (server_id)-1; #else - snprintf (srv_local.sun_path, sizeof (srv_local.sun_path), "%s/socket", dbconfdir); + char *socketdirenv = getenv ("DDB_SOCKET_DIR"); + snprintf (srv_local.sun_path, sizeof (srv_local.sun_path), "%s/socket", socketdirenv ? socketdirenv : dbconfdir); if (unlink(srv_local.sun_path) < 0) { perror ("INFO: unlink socket"); } @@ -569,7 +570,8 @@ main (int argc, char *argv[]) { memcpy (remote.sun_path, server_id, sizeof (server_id)); len = offsetof(struct sockaddr_un, sun_path) + sizeof (server_id)-1; #else - snprintf (remote.sun_path, sizeof (remote.sun_path), "%s/socket", dbconfdir); + char *socketdirenv = getenv ("DDB_SOCKET_DIR"); + snprintf (remote.sun_path, sizeof (remote.sun_path), "%s/socket", socketdirenv ? socketdirenv : dbconfdir); len = offsetof(struct sockaddr_un, sun_path) + strlen (remote.sun_path); #endif if (connect(s, (struct sockaddr *)&remote, len) == 0) { |