FPII-2183: DO NOT MERGE Fix potential DoS caused by delivering signal to BT process

DO NOT MERGE Fix potential DoS caused by delivering signal to BT process

Bug: 28885210
Change-Id: I42fe6830d2f03ea12c4016a11c2eb5cea2903020
diff --git a/btif/src/btif_sock_util.c b/btif/src/btif_sock_util.c
index 8e016e2..5fe7d95 100644
--- a/btif/src/btif_sock_util.c
+++ b/btif/src/btif_sock_util.c
@@ -73,7 +73,7 @@
     int ret;
     while(s)
     {
-        do ret = send(sock_fd, buf, s, 0);
+        do ret = TEMP_FAILURE_RETRY(send(sock_fd, buf, s, 0));
         while(ret < 0 && errno == EINTR);
         if(ret <= 0)
         {
@@ -91,7 +91,7 @@
     int ret = -1;
     while(r)
     {
-        do ret = recv(sock_fd, buf, r, MSG_WAITALL);
+        do ret = TEMP_FAILURE_RETRY(recv(sock_fd, buf, r, MSG_WAITALL));
         while(ret < 0 && errno == EINTR);
         if(ret <= 0)
         {
@@ -139,7 +139,7 @@
         msg.msg_iovlen = 1;
 
         do {
-            ret = sendmsg(sock_fd, &msg, MSG_NOSIGNAL);
+            ret = TEMP_FAILURE_RETRY(sendmsg(sock_fd, &msg, MSG_NOSIGNAL));
         } while (ret < 0 && errno == EINTR);
 
         if (ret < 0) {