From 3777bd3a33ee27127171ea76474d0940ca82ae23 Mon Sep 17 00:00:00 2001 From: Abhishek Sansanwal Date: Mon, 27 Aug 2018 11:48:28 +0530 Subject: [PATCH] Return fail if found invited device list or channel list empty Signed-off-by: Abhishek Sansanwal Change-Id: I6fb7f21406e5d548b39d1de8e2ec053eae189f13 --- test/mdg-manager.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/mdg-manager.c b/test/mdg-manager.c index 83f6c75..f724307 100755 --- a/test/mdg-manager.c +++ b/test/mdg-manager.c @@ -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) { -- 2.7.4