chiark / gitweb /
util: replace close_nointr_nofail() by a more useful safe_close()
[elogind.git] / src / libsystemd / sd-rtnl / sd-rtnl.c
index 1b9f58372690197851530b8217fa2e62512555bd..e5610b43358d97058e340b8ae2808b0fc85268df 100644 (file)
@@ -132,9 +132,7 @@ sd_rtnl *sd_rtnl_unref(sd_rtnl *rtnl) {
                         free(f);
                 }
 
-                if (rtnl->fd >= 0)
-                        close_nointr_nofail(rtnl->fd);
-
+                safe_close(rtnl->fd);
                 free(rtnl);
         }
 
@@ -277,6 +275,9 @@ static int process_reply(sd_rtnl *rtnl, sd_rtnl_message *m) {
         assert(rtnl);
         assert(m);
 
+        if (sd_rtnl_message_is_broadcast(m))
+                return 0;
+
         serial = rtnl_message_get_serial(m);
         c = hashmap_remove(rtnl->reply_callbacks, &serial);
         if (!c)