chiark / gitweb /
bus: properly parse NameOwnerChanged messages when caller explicitly wants to match...
authorLennart Poettering <lennart@poettering.net>
Thu, 12 Dec 2013 21:17:38 +0000 (22:17 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 13 Dec 2013 03:06:43 +0000 (04:06 +0100)
src/libsystemd-bus/bus-control.c

index db7263f..5125fd9 100644 (file)
@@ -741,7 +741,7 @@ static int add_name_change_match(sd_bus *bus,
                         return 0;
         }
 
-        if (old_owner) {
+        if (!isempty(old_owner)) {
                 r = bus_kernel_parse_unique_name(old_owner, &old_owner_id);
                 if (r < 0)
                         return 0;
@@ -751,7 +751,7 @@ static int add_name_change_match(sd_bus *bus,
                         return 0;
         }
 
-        if (new_owner) {
+        if (!isempty(new_owner)) {
                 r = bus_kernel_parse_unique_name(new_owner, &new_owner_id);
                 if (r < 0)
                         return r;