|
a/src/utils/netcon.cpp |
|
b/src/utils/netcon.cpp |
|
... |
|
... |
387 |
else
|
387 |
else
|
388 |
ret = ::write(m_fd, buf, cnt);
|
388 |
ret = ::write(m_fd, buf, cnt);
|
389 |
|
389 |
|
390 |
// Note: byte count may be different from cnt if fd is non-blocking
|
390 |
// Note: byte count may be different from cnt if fd is non-blocking
|
391 |
if (ret < 0) {
|
391 |
if (ret < 0) {
|
392 |
char fdcbuf[10];sprintf(fdcbuf, "%d", m_fd);
|
392 |
char fdcbuf[20];sprintf(fdcbuf, "%d", m_fd);
|
393 |
LOGSYSERR("NetconData::send", "send", fdcbuf);
|
393 |
LOGSYSERR("NetconData::send", "send", fdcbuf);
|
394 |
}
|
394 |
}
|
395 |
return ret;
|
395 |
return ret;
|
396 |
}
|
396 |
}
|
397 |
|
397 |
|
|
... |
|
... |
451 |
return -1;
|
451 |
return -1;
|
452 |
}
|
452 |
}
|
453 |
}
|
453 |
}
|
454 |
m_didtimo = 0;
|
454 |
m_didtimo = 0;
|
455 |
if ((cnt = read(m_fd, buf + fromibuf, cnt)) < 0) {
|
455 |
if ((cnt = read(m_fd, buf + fromibuf, cnt)) < 0) {
|
456 |
char fdcbuf[10];sprintf(fdcbuf, "%d", m_fd);
|
456 |
char fdcbuf[20];sprintf(fdcbuf, "%d", m_fd);
|
457 |
LOGSYSERR("NetconData::receive", "read", fdcbuf);
|
457 |
LOGSYSERR("NetconData::receive", "read", fdcbuf);
|
458 |
return -1;
|
458 |
return -1;
|
459 |
}
|
459 |
}
|
460 |
LOGDEB2(("NetconData::receive: normal return, cnt %d\n", cnt));
|
460 |
LOGDEB2(("NetconData::receive: normal return, cnt %d\n", cnt));
|
461 |
return fromibuf + cnt;
|
461 |
return fromibuf + cnt;
|