mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-23 20:35:42 +02:00
module/network: only log SSID when different from current one
This prevents log spamming with poll-interval set Closes #232
This commit is contained in:
parent
028011a816
commit
8f1a123de2
1 changed files with 5 additions and 2 deletions
|
@ -837,7 +837,9 @@ handle_nl80211_new_interface(struct module *mod, uint16_t type, bool nested,
|
|||
|
||||
case NL80211_ATTR_SSID: {
|
||||
const char *ssid = payload;
|
||||
LOG_INFO("%s: SSID: %.*s", m->iface, (int)len, ssid);
|
||||
|
||||
if (m->ssid == NULL || strncmp(m->ssid, ssid, len) != 0)
|
||||
LOG_INFO("%s: SSID: %.*s", m->iface, (int)len, ssid);
|
||||
|
||||
mtx_lock(&mod->lock);
|
||||
free(m->ssid);
|
||||
|
@ -991,7 +993,8 @@ handle_ies(struct module *mod, const void *_ies, size_t len)
|
|||
const char *ssid = (const char *)&ies[2];
|
||||
const size_t ssid_len = ies[1];
|
||||
|
||||
LOG_INFO("%s: SSID: %.*s", m->iface, (int)ssid_len, ssid);
|
||||
if (m->ssid == NULL || strncmp(m->ssid, ssid, ssid_len) != 0)
|
||||
LOG_INFO("%s: SSID: %.*s", m->iface, (int)ssid_len, ssid);
|
||||
|
||||
mtx_lock(&mod->lock);
|
||||
free(m->ssid);
|
||||
|
|
Loading…
Add table
Reference in a new issue