mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-07-24 22:06:39 +00:00
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:
parent
1b1c0b657a
commit
73a3bd206f
@ -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
|
||||
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user