Replace the deprecatd soup API
[platform/core/connectivity/bluetooth-frwk.git] / bt-httpproxy / bt-httpproxy.c
index 4d23471..2035160 100644 (file)
@@ -1148,11 +1148,6 @@ void _bt_hps_gatt_char_property_changed_event(GVariant *msg,
 
        while ((g_variant_iter_loop(&value_iter, "{sv}", &property, &var))) {
 
-               if (property == NULL) {
-                       BT_ERR("Property NULL");
-                       return;
-               }
-
                if (!g_strcmp0(property, "WriteValue")) {
                        int len = 0;
                        BT_INFO("WriteValue");
@@ -1253,7 +1248,7 @@ void _bt_hps_gatt_char_property_changed_event(GVariant *msg,
 
                if (property == NULL) {
                        BT_ERR("Property NULL");
-                       return;
+                       break;
                }
 
                if (strcasecmp(property, "ChangedValue") == 0) {
@@ -1269,15 +1264,6 @@ void _bt_hps_gatt_char_property_changed_event(GVariant *msg,
                                g_byte_array_append(gp_byte_array,
                                        (const guint8 *)g_variant_get_data(val), len);
                                if (gp_byte_array->len != 0) {
-                                       GVariant *byte_array = NULL;
-                                       byte_array = g_variant_new_from_data(
-                                                               G_VARIANT_TYPE_BYTESTRING,
-                                                               gp_byte_array->data,
-                                                               gp_byte_array->len,
-                                                               TRUE, NULL, NULL);
-                                       param = g_variant_new("(is@ay)", result, char_handle,
-                                                               byte_array);
-
                                        if (strcmp(path, http_uri_obj_path)) {
                                                //Retrive URI
                                                _bt_hps_uri_write_cb(NULL, len);
@@ -1771,7 +1757,7 @@ int main(void)
                return -5;
        }
 
-       hps_soup_session = soup_session_async_new();
+       hps_soup_session = soup_session_new();
        if (hps_soup_session == NULL) {
                BT_ERR("Failed to soup_session_async_new");
                return -6;