This is needed for cases when socket fd is equal to 0
Change-Id: Idb5926594f47cfad21fb8c6cc36a3b815ef667a0
ssize_t nwrite = 0;
size_t nbytes = 0;
- if (sockfd > 0) {
+ if (sockfd >= 0) {
// send size number of bytes to Simulator Daemon
do {
nwrite = send(sockfd, fdata + nbytes, size - nbytes, 0);
ssize_t nread = 0;
size_t nbytes = 0;
- if (sockfd > 0) {
+ if (sockfd >= 0) {
// receive size number of bytes to Simulator Daemon
do {
nread = recv(sockfd, fdata + nbytes, size - nbytes, 0);
LOGD(SSF_LIB, "Entry");
ssize_t nwrite = 0;
size_t nbytes = 0;
- if (sockfd > 0) {
+ if (sockfd >= 0) {
do {
nwrite = send(sockfd, fdata + nbytes, size - nbytes, 0);
} while ((nwrite == -1 && errno == EINTR) || (nwrite > 0 && ((nbytes +=
LOGD(SSF_LIB, "Entry");
ssize_t nread = 0;
size_t nbytes = 0;
- if (sockfd > 0) {
+ if (sockfd >= 0) {
do {
nread = recv(sockfd, fdata + nbytes, size - nbytes, 0);
} while ((nread == -1 && errno == EINTR)