Removed some UDP socket warnings
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@377 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
parent
64158afc10
commit
1f79fd08cc
|
@ -26,6 +26,7 @@
|
||||||
#include <pj/os.h>
|
#include <pj/os.h>
|
||||||
#include <pj/pool.h>
|
#include <pj/pool.h>
|
||||||
#include <pj/sock.h>
|
#include <pj/sock.h>
|
||||||
|
#include <pj/compat/socket.h>
|
||||||
#include <pj/string.h>
|
#include <pj/string.h>
|
||||||
|
|
||||||
|
|
||||||
|
@ -156,8 +157,14 @@ static void udp_on_read_complete( pj_ioqueue_key_t *key,
|
||||||
rdata->pkt_info.len = 0;
|
rdata->pkt_info.len = 0;
|
||||||
|
|
||||||
} else if (bytes_read == 0) {
|
} else if (bytes_read == 0) {
|
||||||
|
|
||||||
/* TODO: */
|
/* TODO: */
|
||||||
} else {
|
|
||||||
|
} else if (-bytes_read != PJ_STATUS_FROM_OS(OSERR_EWOULDBLOCK) &&
|
||||||
|
-bytes_read != PJ_STATUS_FROM_OS(OSERR_EINPROGRESS) &&
|
||||||
|
-bytes_read != PJ_STATUS_FROM_OS(OSERR_ECONNRESET))
|
||||||
|
{
|
||||||
|
|
||||||
/* Report error to endpoint. */
|
/* Report error to endpoint. */
|
||||||
PJSIP_ENDPT_LOG_ERROR((rdata->tp_info.transport->endpt,
|
PJSIP_ENDPT_LOG_ERROR((rdata->tp_info.transport->endpt,
|
||||||
rdata->tp_info.transport->obj_name,
|
rdata->tp_info.transport->obj_name,
|
||||||
|
@ -213,11 +220,19 @@ static void udp_on_read_complete( pj_ioqueue_key_t *key,
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (i < MAX_IMMEDIATE_PACKET) {
|
if (i < MAX_IMMEDIATE_PACKET) {
|
||||||
/* Report error to endpoint. */
|
|
||||||
PJSIP_ENDPT_LOG_ERROR((rdata->tp_info.transport->endpt,
|
/* Report error to endpoint if this is not EWOULDBLOCK error.*/
|
||||||
rdata->tp_info.transport->obj_name,
|
if (status != PJ_STATUS_FROM_OS(OSERR_EWOULDBLOCK) &&
|
||||||
status,
|
status != PJ_STATUS_FROM_OS(OSERR_EINPROGRESS) &&
|
||||||
"Warning: pj_ioqueue_recvfrom error"));
|
status != PJ_STATUS_FROM_OS(OSERR_ECONNRESET))
|
||||||
|
{
|
||||||
|
|
||||||
|
PJSIP_ENDPT_LOG_ERROR((rdata->tp_info.transport->endpt,
|
||||||
|
rdata->tp_info.transport->obj_name,
|
||||||
|
status,
|
||||||
|
"Warning: pj_ioqueue_recvfrom"));
|
||||||
|
}
|
||||||
|
|
||||||
/* Continue loop. */
|
/* Continue loop. */
|
||||||
bytes_read = 0;
|
bytes_read = 0;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue