GVariant *value;
int last_scan_type = -1;
- g_variant_get(param, "(sv)", &key, &value);
- WIFI_LOG(WIFI_INFO, "key: %s", key);
- if (g_variant_is_of_type(value, G_VARIANT_TYPE_INT32)) {
+ WIFI_LOG(WIFI_INFO, "param type: %s", g_variant_get_type_string(param));
+
+ if (g_variant_is_of_type(param, ((const GVariantType *)"(sv)"))) {
+ g_variant_get(param, "(sv)", &key, &value);
+ WIFI_LOG(WIFI_INFO, "key: %s", key);
if (g_strcmp0(key, "Scantype") == 0) {
- last_scan_type = g_variant_get_int32(value);
- WIFI_LOG(WIFI_INFO, "last scan type: %d (0:full,1:specific,2:multi)", last_scan_type);
+ if (g_variant_is_of_type(value, G_VARIANT_TYPE_INT32)) {
+ last_scan_type = g_variant_get_int32(value);
+ WIFI_LOG(WIFI_INFO, "last scan type: %d (0:full,1:specific,2:multi)", last_scan_type);
+ }
}
- }
- g_free((gchar *)key);
- if (NULL != value)
- g_variant_unref(value);
+ g_free((gchar *)key);
+ if (NULL != value)
+ g_variant_unref(value);
+ }
/* Check if any scan request is pending, if scan request is pending then
* do not send scan-done signal to application and invoke pending scan request. */