summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2019-10-06 14:53:03 +0200
committerGaute Hope <eg@gaute.vetsj.com>2019-10-06 18:09:22 +0200
commit35660d486bed3c856603dcff8e8b52153e8e8da9 (patch)
treeb7805f93950094badab0beff138a05dd47c2286a
parent3efcc7c674e3d0fdd7e75e5ff86d81feb161f936 (diff)
page_client: Initialize socket_addr when creating an abstract socket as well
Fixes #661. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
-rw-r--r--src/modes/thread_view/page_client.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/modes/thread_view/page_client.cc b/src/modes/thread_view/page_client.cc
index a151b58..993d32c 100644
--- a/src/modes/thread_view/page_client.cc
+++ b/src/modes/thread_view/page_client.cc
@@ -116,17 +116,16 @@ namespace Astroid {
/* set up unix socket */
LOG (warn) << "pc: id: " << id;
+ socket_addr = ustring::compose ("%1/astroid.%2.%3.%4",
+ astroid->standard_paths ().socket_dir.c_str(),
+ getpid(),
+ id,
+ UstringUtils::random_alphanumeric (30));
refptr<Gio::UnixSocketAddress> addr;
if(Gio::UnixSocketAddress::abstract_names_supported ()) {
addr = Gio::UnixSocketAddress::create (socket_addr,
Gio::UNIX_SOCKET_ADDRESS_ABSTRACT);
} else {
- socket_addr = ustring::compose ("%1/astroid.%2.%3.%4",
- astroid->standard_paths ().socket_dir.c_str(),
- getpid(),
- id,
- UstringUtils::random_alphanumeric (30));
-
addr = Gio::UnixSocketAddress::create (socket_addr,
Gio::UNIX_SOCKET_ADDRESS_PATH);
}