Remove unnecessary code to unset a given fd in catcpserver
authorhyuna0213.jo <hyuna0213.jo@samsung.com>
Fri, 16 Dec 2016 00:47:47 +0000 (09:47 +0900)
committerAshok Babu Channa <ashok.channa@samsung.com>
Thu, 22 Dec 2016 09:50:49 +0000 (09:50 +0000)
After reading data from file descriptor, we set the readFds again.
so it is not required to remove a given file descriptor from a set.

Change-Id: I8c7a72b14bcce2f1a513cc6085d4113fa8fea9b1
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15731
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
resource/csdk/connectivity/src/tcp_adapter/catcpserver.c

index c1f330b..4b00d0d 100644 (file)
@@ -273,7 +273,6 @@ static void CASelectReturned(fd_set *readFds)
             return;
         }
         OIC_LOG_V(DEBUG, TAG, "Received new connection event with [%s]", buf);
-        FD_CLR(caglobals.tcp.connectionFds[0], readFds);
         return;
     }
     else
@@ -288,10 +287,6 @@ static void CASelectReturned(fd_set *readFds)
                 if (FD_ISSET(svritem->fd, readFds))
                 {
                     CAReceiveMessage(svritem->fd);
-                    if (-1 != svritem->fd)
-                    {
-                        FD_CLR(svritem->fd, readFds);
-                    }
                 }
             }
         }