diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-05-10 19:24:40 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-05-10 19:24:40 +0000 |
commit | 50a501dbe89ec8f9a76540015890dd361f1ec8a1 (patch) | |
tree | a45dac4292320647ed297b35239fccf38eb5885b /pjlib/src/pj/sock_bsd.c | |
parent | 5f10c756ac9d5f48efe2adbcccf5d54634540d61 (diff) |
Merge-in RTEMS port patch by Phil Torre <ptorre@zetron.com>, alpha release.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@433 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/src/pj/sock_bsd.c')
-rw-r--r-- | pjlib/src/pj/sock_bsd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pjlib/src/pj/sock_bsd.c b/pjlib/src/pj/sock_bsd.c index e207eeaa..37cb85e5 100644 --- a/pjlib/src/pj/sock_bsd.c +++ b/pjlib/src/pj/sock_bsd.c @@ -26,7 +26,7 @@ /* * Address families conversion. - * The values here are indexed based on pj_addr_family-0xFF00. + * The values here are indexed based on pj_addr_family. */ const pj_uint16_t PJ_AF_UNIX = AF_UNIX; const pj_uint16_t PJ_AF_INET = AF_INET; @@ -44,7 +44,7 @@ const pj_uint16_t PJ_AF_IRDA = 0xFFFF; /* * Socket types conversion. - * The values here are indexed based on pj_sock_type-0xFF00 + * The values here are indexed based on pj_sock_type */ const pj_uint16_t PJ_SOCK_STREAM = SOCK_STREAM; const pj_uint16_t PJ_SOCK_DGRAM = SOCK_DGRAM; @@ -346,7 +346,7 @@ PJ_DEF(pj_status_t) pj_sock_bind( pj_sock_t sock, { PJ_CHECK_STACK(); - PJ_ASSERT_RETURN(addr && len > 0, PJ_EINVAL); + PJ_ASSERT_RETURN(addr && len >= sizeof(struct sockaddr_in), PJ_EINVAL); if (bind(sock, (struct sockaddr*)addr, len) != 0) return PJ_RETURN_OS_ERROR(pj_get_native_netos_error()); |