Remove sleep in Android EDR.
authorJaehong Jo <jaehong.jo@samsung.com>
Wed, 26 Aug 2015 06:16:42 +0000 (15:16 +0900)
committerJon A. Cruz <jonc@osg.samsung.com>
Wed, 26 Aug 2015 16:26:46 +0000 (16:26 +0000)
It is no longer necessary.

Change-Id: I8d2e0f741830f659edee7b977f24d32f8e93b8c1
Signed-off-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/2277
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
resource/csdk/connectivity/src/bt_edr_adapter/android/caedrserver.c

index c54411a..413a4ef 100644 (file)
@@ -19,7 +19,6 @@
  ******************************************************************/
 
 #include <stdio.h>
-#include <unistd.h>
 #include <string.h>
 #include <jni.h>
 
@@ -170,15 +169,15 @@ static void CAReceiveHandler(void *data)
         if (0 == length)
         {
             OIC_LOG(DEBUG, TAG, "socket list is empty");
-            sleep(1);
         }
-
-        uint32_t idx;
-        for (idx = 0; idx < length; idx++)
+        else
         {
-            OIC_LOG(DEBUG, TAG, "start CAEDRNativeReadData");
-            CAEDRNativeReadData(env, idx, ctx->type);
-            sleep(1);
+            uint32_t idx;
+            for (idx = 0; idx < length; idx++)
+            {
+                OIC_LOG(DEBUG, TAG, "start CAEDRNativeReadData");
+                CAEDRNativeReadData(env, idx, ctx->type);
+            }
         }
     }