Fixed the NULL pointer dereferencing
[platform/core/api/connection.git] / unittest / mock / connection-mock.c
index 08f9bba..02fc8c7 100755 (executable)
@@ -286,6 +286,13 @@ API int net_get_wifi_state(void *handle, net_wifi_state_t *current_state)
        return NET_ERR_NONE;
 }
 
+API int net_get_wifi_interface_list(void *handle, GSList **interface_list)
+{
+       *interface_list = g_slist_append(*interface_list,
+               g_strdup("dummy_ifname"));
+       return NET_ERR_NONE;
+}
+
 static void __net_init_profile_info(net_device_t profile_type, net_profile_info_t *ProfInfo)
 {
        int i = 0;
@@ -931,4 +938,4 @@ API int net_mptcp_get_scheduler(void *handle, char **scheduler)
 {
        *scheduler = g_strdup("default");
        return NET_ERR_NONE;
-}
\ No newline at end of file
+}