diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2017-03-02 21:17:22 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2017-03-24 12:42:09 +0100 |
commit | 8da65ac5cd533150b945576c8ed17952c2d332eb (patch) | |
tree | c259d1ef33219920c7f7e15c94c8f9cb9df09477 | |
parent | c307163b77b4b7df68d79972dae8d2627643afff (diff) | |
download | NetworkManager-8da65ac5cd533150b945576c8ed17952c2d332eb.tar.gz |
supplicant: log the device context
-rw-r--r-- | src/supplicant/nm-supplicant-interface.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/supplicant/nm-supplicant-interface.c b/src/supplicant/nm-supplicant-interface.c index 5bc1dae140..71f1f9aa8e 100644 --- a/src/supplicant/nm-supplicant-interface.c +++ b/src/supplicant/nm-supplicant-interface.c @@ -135,16 +135,12 @@ G_DEFINE_TYPE (NMSupplicantInterface, nm_supplicant_interface, G_TYPE_OBJECT) #define _NMLOG(level, ...) \ G_STMT_START { \ char _sbuf[64]; \ + const char *__ifname = self ? NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self)->dev : NULL; \ \ - nm_log ((level), _NMLOG_DOMAIN, NULL, NULL, \ + nm_log ((level), _NMLOG_DOMAIN, __ifname, NULL, \ "%s%s: " _NM_UTILS_MACRO_FIRST(__VA_ARGS__), \ _NMLOG_PREFIX_NAME, \ - ((self) \ - ? nm_sprintf_buf (_sbuf, \ - "[%p,%s]", \ - (self), \ - NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self)->dev) \ - : "") \ + ((self) ? nm_sprintf_buf (_sbuf, "[%p,%s]", (self), __ifname) : "") \ _NM_UTILS_MACRO_REST(__VA_ARGS__)); \ } G_STMT_END |