From c95d10e0aba1e522526b01c71169ce2f5d6d9820 Mon Sep 17 00:00:00 2001 From: Hyuk Lee Date: Thu, 7 Jan 2016 11:10:45 +0900 Subject: [PATCH] Sync with the Tizen 2.4 Code Fix: remove swap file revert the org.bluez.ag_agent.service Change-Id: I16ea3993d5cb01c4b634fa485520c4f398aa302d Signed-off-by: Hyuk Lee --- ag-agent/bluetooth-ag-agent.c | 30 +++++++++++++++--------------- map-agent/map_bmessage.c | 11 +++++++---- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/ag-agent/bluetooth-ag-agent.c b/ag-agent/bluetooth-ag-agent.c index ff5b9c8..a611d94 100644 --- a/ag-agent/bluetooth-ag-agent.c +++ b/ag-agent/bluetooth-ag-agent.c @@ -2934,10 +2934,10 @@ static void __bt_ag_agent_method(GDBusConnection *connection, if (g_strcmp0(method_name, "NewConnection") == 0) { gint32 fd; - int index; + int index = 0; GDBusMessage *msg; GUnixFDList *fd_list; - GVariant *options; + GVariant *options = NULL; int device_count = 0; GSList *l; @@ -3031,9 +3031,9 @@ static void __bt_ag_agent_method(GDBusConnection *connection, g_dbus_method_invocation_return_value(invocation, NULL); } else if (g_strcmp0(method_name, "IncomingCall") == 0) { - gchar *path; - gchar *number; - gint call_id; + gchar *path = NULL; + gchar *number = NULL; + gint call_id = 0; g_variant_get(parameters, "(&s&si)", &path, &number, &call_id); @@ -3048,9 +3048,9 @@ static void __bt_ag_agent_method(GDBusConnection *connection, goto fail; g_dbus_method_invocation_return_value(invocation, NULL); } else if (g_strcmp0(method_name, "OutgoingCall") == 0) { - gchar *path; - gchar *number; - gint call_id; + gchar *path = NULL; + gchar *number = NULL; + gint call_id = 0; g_variant_get(parameters, "(&s&si)", &path, &number, &call_id); @@ -3065,10 +3065,10 @@ static void __bt_ag_agent_method(GDBusConnection *connection, goto fail; g_dbus_method_invocation_return_value(invocation, NULL); } else if (g_strcmp0(method_name, "ChangeCallStatus") == 0) { - gchar *path; - gchar *number; - gint status; - gint call_id; + gchar *path = NULL; + gchar *number = NULL; + gint status = 0; + gint call_id = 0; GSList *l; g_variant_get(parameters, "(&s&sii)", @@ -3321,7 +3321,7 @@ static void __bt_ag_agent_method(GDBusConnection *connection, g_dbus_method_invocation_return_value(invocation, g_variant_new("(q)", gain_value)); } else if (g_strcmp0(method_name, "SetSpeakerGain") == 0) { - guint16 gain; + guint16 gain = 0; bt_ag_info_t *bt_ag_info = __bt_get_active_headset(remote_dev_path); g_variant_get(parameters, "(q)", &gain); @@ -3338,7 +3338,7 @@ static void __bt_ag_agent_method(GDBusConnection *connection, g_dbus_method_invocation_return_value(invocation, NULL); } else if (g_strcmp0(method_name, "GetMicrophoneGain") == 0) { bt_ag_slconn_t *slconn = NULL; - guint16 gain_value; + guint16 gain_value = 0; bt_ag_info_t *bt_ag_info = __bt_get_active_headset(remote_dev_path); if (bt_ag_info == NULL) { @@ -3358,7 +3358,7 @@ static void __bt_ag_agent_method(GDBusConnection *connection, g_dbus_method_invocation_return_value(invocation, g_variant_new("(q)", gain_value)); } else if (g_strcmp0(method_name, "SetMicrophoneGain") == 0) { - guint16 gain; + guint16 gain = 0; bt_ag_info_t *bt_ag_info = __bt_get_active_headset(remote_dev_path); g_variant_get(parameters, "(q)", &gain); diff --git a/map-agent/map_bmessage.c b/map-agent/map_bmessage.c index b4bf5d9..87ce5bf 100644 --- a/map-agent/map_bmessage.c +++ b/map-agent/map_bmessage.c @@ -600,12 +600,14 @@ struct bmsg_envelope *bmsg_get_envelope_data(gchar **block_data) { FN_START; gchar *sub_block_data; + gchar *benv_block_data; struct bmsg_envelope *envelope_data; struct benv_data *rec_data; envelope_data = g_new0(struct bmsg_envelope, 1); - sub_block_data = bmsg_get_parse_sub_block(block_data, "BENV"); + benv_block_data = bmsg_get_parse_sub_block(block_data, "BENV"); + sub_block_data = benv_block_data; while (sub_block_data) { @@ -619,11 +621,12 @@ struct bmsg_envelope *bmsg_get_envelope_data(gchar **block_data) rec_data = bmsg_get_env_encapsulation_data( &sub_block_data); } - g_free(sub_block_data); - sub_block_data = bmsg_get_parse_sub_block(&sub_block_data, + g_free(benv_block_data); + benv_block_data = bmsg_get_parse_sub_block(&sub_block_data, "BENV"); + sub_block_data = benv_block_data; } - g_free(sub_block_data); + g_free(benv_block_data); FN_END; return envelope_data; } -- 2.7.4