Modify log message 33/188833/3
authorINSUN PYO <insun.pyo@samsung.com>
Tue, 11 Sep 2018 04:17:02 +0000 (13:17 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Tue, 11 Sep 2018 23:52:05 +0000 (23:52 +0000)
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: Iacfc34bdd9ca9978d9ef6c83e35501cb2db4399c

src/usb_host.c

index d56835b65433312289301aff4dd659f267b902ea..bd7f3ed8d61eb3f33a30b466452acae3c4b9de6f 100755 (executable)
@@ -454,6 +454,7 @@ static void fd_removed_cb(int fd, void *user_data)
        struct gio_channel_wrap *ch;
        usb_host_context_h ctx = user_data;
        GList *l, *next;
+       bool found = false;
        int rfd;
 
        pthread_mutex_lock(&ctx->channel_list_lock);
@@ -467,13 +468,14 @@ static void fd_removed_cb(int fd, void *user_data)
                        g_io_channel_unref(ch->ch);
                        ctx->gio_channels = g_list_delete_link(ctx->gio_channels, l);
                        free(ch);
+                       found = true;
                }
 
                l = next;
        }
        pthread_mutex_unlock(&ctx->channel_list_lock);
 
-       _I("removed fd %d", fd);
+       _I("%s fd %d", found ? "removed" : "not found", fd);
 }
 
 int usb_host_create(usb_host_context_h *ctx)