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;
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);
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);
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)",
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);
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) {
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);
{
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) {
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;
}