Return fail if found invited device list or channel list empty 41/187641/1
authorAbhishek Sansanwal <abhishek.s94@samsung.com>
Mon, 27 Aug 2018 06:18:28 +0000 (11:48 +0530)
committerAbhishek Sansanwal <abhishek.s94@samsung.com>
Mon, 27 Aug 2018 06:20:13 +0000 (11:50 +0530)
Signed-off-by: Abhishek Sansanwal <abhishek.s94@samsung.com>
Change-Id: I6fb7f21406e5d548b39d1de8e2ec053eae189f13

test/mdg-manager.c

index 83f6c75..f724307 100755 (executable)
@@ -817,6 +817,12 @@ static int __send_data(int devidx, int chaidx)
        char *address = NULL;
        mdg_device_h device = NULL;
        channel_t *channel = NULL;
+
+       if (!found_invited_device_list || !found_channel_list) {
+                       msgr("Find local device first");
+                       return RET_FAILURE;
+       }
+
        if (found_invited_device_list) {
                device = g_list_nth_data(found_invited_device_list, devidx - 1);
                if (NULL == device) {