afb-socket: API name cares of abstract UDS 51/16751/1
authorJose Bollo <jose.bollo@iot.bzh>
Thu, 13 Sep 2018 10:18:44 +0000 (12:18 +0200)
committerJose Bollo <jose.bollo@iot.bzh>
Mon, 24 Sep 2018 08:05:00 +0000 (10:05 +0200)
Change-Id: Ie485672d8f66ff32ea20cb0eb313690ba380db4a
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
src/afb-socket.c

index 77b5edf..f4ee7e1 100644 (file)
@@ -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;