ClusterLabs/libqb — pull request #136 by grueni (2014-12-22 21:11:08+00:00)
Title: Fix: Unlink files bound to unix domain sockets

In qb_ipcs_us_connect 4 files are created and bound.
I dont' know how this works for QB_LINUX or QB_CYGWIN.
But for the other OS the files are created and must be unlinked.
I use the same logic to construct the file names and unlink the files.

qb_ipcc_us_connect calls this
...
res = qb_ipc_dgram_sock_connect(r->response, "response", "request",
r->max_msg_size, &c->request.u.us.sock);
and qb_ipc_dgram_sock_connect calls
..
set_sock_addr

and in set_sock_addr the files are created if not Linux or Cygwin.
...
#if defined(QB_LINUX) || defined(QB_CYGWIN)
snprintf(address->sun_path + 1, UNIX_PATH_MAX - 1, "%s", socket_name);
#else
snprintf(address->sun_path, sizeof(address->sun_path), "%s/%s", SOCKETDIR,
socket_name);
#endif
...