chiark / gitweb /
sd-rtnl: rtnl_call - don't dispatch wqueue after timeout has passed
authorTom Gundersen <teg@jklm.no>
Mon, 29 Dec 2014 00:54:04 +0000 (01:54 +0100)
committerTom Gundersen <teg@jklm.no>
Mon, 29 Dec 2014 00:59:49 +0000 (01:59 +0100)
Only a minor change as the timeout would be hit soon thereafetr at the next loop.

src/libsystemd/sd-rtnl/sd-rtnl.c

index ae3573937c7aa042afee18bc3fc0bb421a944482..7d388c975860bc4c42a0be633fe7fb3ed3415c89 100644 (file)
@@ -701,6 +701,8 @@ int sd_rtnl_call(sd_rtnl *rtnl,
                 r = rtnl_poll(rtnl, true, left);
                 if (r < 0)
                         return r;
+                else if (r == 0)
+                        return -ETIMEDOUT;
 
                 r = dispatch_wqueue(rtnl);
                 if (r < 0)