The IPC system smply concatenates SOCKETDIR with run/<socketname> 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
This commit is contained in:
Christine Caulfield 2009-03-25 15:38:56 +00:00
parent 1b1c0b657a
commit 73a3bd206f
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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));