summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose Bollo <jose.bollo@iot.bzh>2018-09-13 12:18:44 +0200
committerJose Bollo <jose.bollo@iot.bzh>2018-09-24 10:05:00 +0200
commitefd6d20aee652b5868090e11504a7ba163a09ee3 (patch)
tree26cad115edda7d64a969c4a4a54b956f5c38d8d6
parentc19ce12fca7560d3712d4e1661e06be3592baf75 (diff)
afb-socket: API name cares of abstract UDS
Change-Id: Ie485672d8f66ff32ea20cb0eb313690ba380db4a Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
-rw-r--r--src/afb-socket.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/afb-socket.c b/src/afb-socket.c
index 77b5edf8..f4ee7e1e 100644
--- a/src/afb-socket.c
+++ b/src/afb-socket.c
@@ -366,9 +366,11 @@ const char *afb_socket_api(const char *uri)
{
int offset;
const char *api;
+ struct entry *entry;
- get_entry(uri, &offset);
+ entry = get_entry(uri, &offset);
uri += offset;
+ uri += (entry->type == Type_Unix && *uri == '@');
api = strstr(uri, as_api);
if (api)
api += sizeof as_api - 1;