HomeClusterLabs Projects
Diffusion LibQB ea4d93156321

Fix: Unlink files bound to unix domain sockets

Description

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

Details

Provenance
Andreas Grueninger <Andreas.Grueninger@some.where>Authored on Dec 22 2014, 4:05 PM
Parents
rQ3f7de657855b: Low: release.mk: update gpg public key
Branches
Unknown
Tags
Unknown

Event Timeline