Exclude the exception codes for coverage
[platform/core/connectivity/bluetooth-agent.git] / ag-agent / bluetooth-ag-agent.c
index 957fdf7..a1f68b4 100644 (file)
@@ -2792,7 +2792,7 @@ static gboolean __bt_ag_agent_is_device_vr_blacklisted(const char *lap_addr)
 
        rewind(fp);
 
-       buffer = g_malloc0(sizeof(char) * size);
+       buffer = g_malloc0((sizeof(char) * size) + 1);
        if (buffer == NULL) {
                ERR("g_malloc0 is failed");
                fclose(fp);
@@ -4256,6 +4256,7 @@ fail:
 /* LCOV_EXCL_STOP */
 
 #ifdef TIZEN_FEATURE_BT_MEDIA_ENHANCE
+/* LCOV_EXCL_START */
 void _bt_ag_agent_check_transport_state(void)
 {
        FN_START;
@@ -4364,6 +4365,7 @@ static void __bt_ag_agent_media_filter_cb(GDBusConnection *connection,
 
        FN_END;
 }
+/* LCOV_EXCL_STOP */
 #endif
 
 /* LCOV_EXCL_START */
@@ -4403,7 +4405,7 @@ static void __bt_ag_agent_dbus_init(void)
 
 #ifdef TIZEN_FEATURE_BT_MEDIA_ENHANCE
        media_sig_id = g_dbus_connection_signal_subscribe(ag_dbus_conn,
-                               NULL, BT_PROPERTIES_INTERFACE, NULL, NULL,
+                               BLUEZ_SERVICE_NAME, BT_PROPERTIES_INTERFACE, NULL, NULL,
                                NULL, 0, __bt_ag_agent_media_filter_cb,
                                NULL, NULL);
 
@@ -4417,7 +4419,6 @@ static void __bt_ag_agent_dbus_init(void)
        FN_END;
        return;
 }
-/* LCOV_EXCL_STOP */
 
 static uint32_t __bt_ag_agent_get_ag_features(void)
 {
@@ -4454,6 +4455,7 @@ static uint32_t __bt_ag_agent_get_ag_features(void)
 
        return ag_features;
 }
+/* LCOV_EXCL_STOP */
 
 /* LCOV_EXCL_START */
 void *__bt_ag_agent_telephony_init(void *arg)