summaryrefslogtreecommitdiffstats
path: root/lib/sender.c
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2021-05-06 14:05:59 +0300
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2021-07-28 13:19:02 +0300
commit2409371e084c6f34e21b27e533ee7d6feca3f471 (patch)
tree16371850dc6a12bcb50b1700201e0e39ed2e0055 /lib/sender.c
parenta189af3e9d74c0cca520e6913f68d5f5f614befc (diff)
wpipc: place sockets in the same runtime directory as pipewire
Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
Diffstat (limited to 'lib/sender.c')
-rw-r--r--lib/sender.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/sender.c b/lib/sender.c
index 7b5b0c9..7d2cd04 100644
--- a/lib/sender.c
+++ b/lib/sender.c
@@ -118,7 +118,7 @@ icipc_sender_new (const char *path,
size_t user_size)
{
struct icipc_sender *self;
- int name_size;
+ int res;
if (path == NULL)
return NULL;
@@ -131,9 +131,8 @@ icipc_sender_new (const char *path,
/* set address */
self->addr.sun_family = AF_LOCAL;
- name_size = snprintf(self->addr.sun_path, sizeof(self->addr.sun_path), "%s",
- path) + 1;
- if (name_size > (int) sizeof(self->addr.sun_path))
+ res = icipc_construct_socket_path (path, self->addr.sun_path, sizeof(self->addr.sun_path));
+ if (res < 0)
goto error;
/* create socket */