softap_enabled_cb ecb = sa->enabled_cb;
void *data = sa->enabled_user_data;
+ if (!_softap_check_handle((softap_h)user_data)) {
+ DBG("Softap handle is already destroyed");
+ return;
+ }
+
g_var = g_dbus_proxy_call_finish(sa->client_bus_proxy, res, &g_error);
if (g_error) {
ERR("DBus error [%s]", g_error->message);
softap_disabled_cb dcb = sa->disabled_cb;
void *data = sa->disabled_user_data;
+ if (!_softap_check_handle((softap_h) sa)) {
+ DBG("Softap handle is already destroyed");
+ return;
+ }
+
g_var = g_dbus_proxy_call_finish(sa->client_bus_proxy, res, &g_error);
if (g_error) {
ERR("DBus error [%s]", g_error->message);
__connect_signals((softap_h)sa);
- DBG("[DBG] create sig.id for softap on (%d)", sigs[E_SIGNAL_SOFTAP_ON].sig_id);
-
*softap = (softap_h) sa;
- DBG("SoftAP Handle[0x%X] SSID[%s] Passphrase[%s] Security[%d] Visibilit[%d]",
- sa, sa->ssid, sa->passphrase, sa->sec_type, sa->visibility);
- DBG("-");
+ _softap_add_handle(sa);
+
+ DBG("-");
return SOFTAP_ERROR_NONE;
}
g_object_unref(sa->client_bus_proxy);
g_object_unref(sa->client_bus);
memset(sa, 0x00, sizeof(__softap_h));
+
+ _softap_remove_handle(sa);
+
free(sa);
sa = NULL;
* limitations under the License.
*/
+#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <system_info.h>
#define WIFI_FEATURE "http://tizen.org/feature/network.wifi"
static __thread bool is_feature_checked = 0;
static __thread bool feature_supported = 0;
+static __thread GSList *softap_handle_list = NULL;
int _softap_check_feature_supported(const char *key)
{
return SOFTAP_ERROR_NONE;
}
+
+void _softap_add_handle(softap_h handle)
+{
+ softap_handle_list = g_slist_append(softap_handle_list, handle);
+}
+
+void _softap_remove_handle(softap_h handle)
+{
+ softap_handle_list = g_slist_remove(softap_handle_list, handle);
+}
+
+bool _softap_check_handle(softap_h handle)
+{
+ if (g_slist_find(softap_handle_list, handle) != NULL)
+ return true;
+ else
+ return false;
+}