Fixed issue where station_joined and station_left event was not notified 47/148047/1 accepted/tizen/unified/20170925.071400 submit/tizen/20170922.085427
authorSaurav Babu <saurav.babu@samsung.com>
Wed, 6 Sep 2017 11:04:53 +0000 (16:34 +0530)
committerSaurav Babu <saurav.babu@samsung.com>
Wed, 6 Sep 2017 11:04:53 +0000 (16:34 +0530)
Change-Id: I855b2fa8254a728f5227f6b69b7aefbff865eb2f
Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
src/wmesh-netlink.c

index a88c6c9..4baffba 100644 (file)
@@ -1308,22 +1308,24 @@ static int _on_receive_mesh_event(struct nl_msg *msg, void *arg)
        case NL80211_CMD_NEW_STATION:
                mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC]));
                WMESH_LOGD("[%s] new station [%s]", ifname, macbuf);
+               wmesh_notify_station_joined((const char*)macbuf);
+
                break;
        case NL80211_CMD_DEL_STATION:
                mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC]));
                WMESH_LOGD("[%s] del station [%s]", ifname, macbuf);
+               wmesh_notify_station_left((const char*)macbuf);
+
                break;
        case NL80211_CMD_NEW_MPATH:
                mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC]));
                WMESH_LOGD("[%s] new mpath [%s]", ifname, macbuf);
 
-               wmesh_notify_station_joined((const char*)macbuf);
                break;
        case NL80211_CMD_DEL_MPATH:
                mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC]));
                WMESH_LOGD("[%s] del mpath [%s]", ifname, macbuf);
 
-               wmesh_notify_station_left((const char*)macbuf);
                break;
        default:
                WMESH_LOGD("event [%d] is not handled", gnlh->cmd);