If status of tizen/android device is unauthorized, block sdb connection.
authorshingil.kang <shingil.kang@samsung.com>
Mon, 18 May 2015 04:55:18 +0000 (13:55 +0900)
committerDongkyun Yun <dk77.yun@samsung.com>
Tue, 21 Jul 2015 05:16:23 +0000 (14:16 +0900)
Change-Id: Ibaf0f6cb6949af155bf47e69544dbc532cfe4417
Signed-off-by: shingil.kang <shingil.kang@samsung.com>
src/transport.c

index 3520421c6f96a0a306053b59d4f7058a164ad274..de820a3094b474f28d1441ed8e30cc1e92097b30 100755 (executable)
@@ -605,6 +605,13 @@ TRANSPORT *acquire_one_transport(transport_type ttype, const char* serial, char*
 
     if (result == NULL ) {
         *error_out = error_message(SDB_MESSAGE_ERROR, ERR_CONNECT_TARGET_NOT_FOUND, NULL);
+    } else {
+               if (result->connection_state == CS_UNAUTHORIZED) {
+                       if (error_out)
+                               *error_out = "device unauthorized. Please check the confirmation dialog on your device.";
+                       result = NULL;
+                       goto exit;
+               }
     }
 
 exit: