Diff between c318d0e0e4731e49f96d86c9bc4c8268f394537c and a8c66bba70390f4f1572d3afe675b13c3d870c0c
Changed Files
| File | Additions | Deletions | Status |
| android/android-tester.c | +7 | -0 | modified |
Full Patch
diff --git a/android/android-tester.c b/android/android-tester.c
index df673c4..39f7991 100644
--- a/android/android-tester.c
+++ b/android/android-tester.c
@@ -17,6 +17,7 @@
#include <stdlib.h>
#include <unistd.h>
+#include <fcntl.h>
#include <glib.h>
#include <sys/socket.h>
@@ -740,6 +741,12 @@ static void test_generic_listen(const void *test_data)
goto clean;
}
+ /* Check that file descriptor is valid */
+ if (status == BT_STATUS_SUCCESS && fcntl(sock_fd, F_GETFD) == -1) {
+ tester_test_failed();
+ return;
+ }
+
tester_test_passed();
clean: