}
if (r < 0)
return log_debug_errno(r, "Failed to request information about wifi interface %d: %m", ifindex);
- if (!reply)
+ if (!reply) {
+ log_debug_errno(r, "No reply received to request for information about wifi interface %d, ignoring.", ifindex);
goto nodata;
+ }
r = sd_netlink_message_get_errno(reply);
if (r < 0)
if (ssid) {
r = sd_netlink_message_read_string_strdup(reply, NL80211_ATTR_SSID, ssid);
if (r == -ENODATA)
- goto nodata;
- if (r < 0)
+ *ssid = NULL;
+ else if (r < 0)
return log_debug_errno(r, "Failed to get NL80211_ATTR_SSID attribute: %m");
}
r = sd_netlink_call(genl, m, 0, &reply);
if (r < 0)
return log_debug_errno(r, "Failed to request information about wifi station: %m");
- if (!reply)
+ if (!reply) {
+ log_debug_errno(r, "No reply received to request for information about wifi station, ignoring.");
goto nodata;
+ }
r = sd_netlink_message_get_errno(reply);
if (r < 0)