From 73a3bd206f4455f705dae4833e4d0f9939c80920 Mon Sep 17 00:00:00 2001 From: Christine Caulfield Date: Wed, 25 Mar 2009 15:38:56 +0000 Subject: [PATCH] The IPC system smply concatenates SOCKETDIR with run/ so if th euser forgets to add a trailing slash to the name: eg ./configure --with-socket-dir=/var/run then the socket is created as /var/runcorosync.ipc This patch adds the slash into the name generation printf. git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1910 fd59a12c-fef9-0310-b244-a6a79926bd2f --- exec/coroipcs.c | 2 +- lib/coroipcc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exec/coroipcs.c b/exec/coroipcs.c index ca00b860..ef165d69 100644 --- a/exec/coroipcs.c +++ b/exec/coroipcs.c @@ -531,7 +531,7 @@ extern void coroipcs_ipc_init ( #if defined(COROSYNC_LINUX) sprintf (un_addr.sun_path + 1, "%s", api->socket_name); #else - sprintf (un_addr.sun_path, "%s%s", SOCKETDIR, api->socket_name); + sprintf (un_addr.sun_path, "%s/%s", SOCKETDIR, api->socket_name); unlink (un_addr.sun_path); #endif diff --git a/lib/coroipcc.c b/lib/coroipcc.c index 3896bf55..f0b6dcb1 100644 --- a/lib/coroipcc.c +++ b/lib/coroipcc.c @@ -304,7 +304,7 @@ coroipcc_service_connect ( #if defined(COROSYNC_LINUX) sprintf (address.sun_path + 1, "%s", socket_name); #else - sprintf (address.sun_path, "%s%s", SOCKETDIR, socket_name); + sprintf (address.sun_path, "%s/%s", SOCKETDIR, socket_name); #endif res = connect (request_fd, (struct sockaddr *)&address, AIS_SUN_LEN(&address));