diff options
author | Liong Sauw Ming <ming@teluu.com> | 2012-08-21 11:16:06 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2012-08-21 11:16:06 +0000 |
commit | fd6814335d62681521c9382fc7c81019b89e814a (patch) | |
tree | 09c3d8e495db4a1c42179eb846d2cfcd3456c5c6 /pjlib/src/pj | |
parent | 88c753faf08efaa247149be47f970f5e389c3180 (diff) |
Re #1559: Removed unnecessary assertion from sock_bsd's pj_sock_recvfrom() implementation.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4233 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/src/pj')
-rw-r--r-- | pjlib/src/pj/sock_bsd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pjlib/src/pj/sock_bsd.c b/pjlib/src/pj/sock_bsd.c index e3afcad5..2862721e 100644 --- a/pjlib/src/pj/sock_bsd.c +++ b/pjlib/src/pj/sock_bsd.c @@ -723,7 +723,6 @@ PJ_DEF(pj_status_t) pj_sock_recvfrom(pj_sock_t sock, { PJ_CHECK_STACK(); PJ_ASSERT_RETURN(buf && len, PJ_EINVAL); - PJ_ASSERT_RETURN(from && fromlen, (*len=-1, PJ_EINVAL)); *len = recvfrom(sock, (char*)buf, *len, flags, (struct sockaddr*)from, (socklen_t*)fromlen); @@ -731,7 +730,9 @@ PJ_DEF(pj_status_t) pj_sock_recvfrom(pj_sock_t sock, if (*len < 0) return PJ_RETURN_OS_ERROR(pj_get_native_netos_error()); else { - PJ_SOCKADDR_RESET_LEN(from); + if (from) { + PJ_SOCKADDR_RESET_LEN(from); + } return PJ_SUCCESS; } } |