summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2012-04-27 01:32:12 +0000
committerBenny Prijono <bennylp@teluu.com>2012-04-27 01:32:12 +0000
commit22098b13d8be9412bcc63202b99160838b099f80 (patch)
tree33542faa7d5fd5323eba1c930b56283fe4d1cce3
parentc8173f5bbbfccf8fca8dc786b7be92eeac0a4dcb (diff)
Re #1474: merged r4100-4107
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4108 74dad513-b988-da41-8d7b-12977e46ad98
-rwxr-xr-xaconfigure5
-rw-r--r--aconfigure.ac2
-rw-r--r--pjlib/src/pjlib-test/udp_echo_srv_ioqueue.c5
-rw-r--r--pjlib/src/pjlib-test/udp_echo_srv_sync.c5
-rw-r--r--pjmedia/src/pjmedia/stream.c4
-rw-r--r--pjsip/src/pjsip/sip_resolve.c8
6 files changed, 18 insertions, 11 deletions
diff --git a/aconfigure b/aconfigure
index dd78a80a..5e2765f5 100755
--- a/aconfigure
+++ b/aconfigure
@@ -6634,9 +6634,8 @@ $as_echo "ok" >&6; }
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status run with --help for more info
-as_fn_error "Error: unable to recognize your IPP installation. Make sure the paths and ARCH suffix are set correctly
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error "Error: unable to recognize your IPP installation. Make sure the paths and ARCH suffix are set correctly, run with --help for more info
+See \`config.log' for more details." "$LINENO" 5; }
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
diff --git a/aconfigure.ac b/aconfigure.ac
index 374332e4..235baf4d 100644
--- a/aconfigure.ac
+++ b/aconfigure.ac
@@ -1111,7 +1111,7 @@ if test "x$enable_ipp" != "xno"; then
]],
[ippStaticInit();])],
[AC_MSG_RESULT(ok)],
- [AC_MSG_FAILURE(Error: unable to recognize your IPP installation. Make sure the paths and ARCH suffix are set correctly, run with --help for more info)])
+ [AC_MSG_FAILURE([Error: unable to recognize your IPP installation. Make sure the paths and ARCH suffix are set correctly, run with --help for more info])])
CFLAGS="$SAVED_CFLAGS"
LDFLAGS="$SAVED_LDFLAGS"
diff --git a/pjlib/src/pjlib-test/udp_echo_srv_ioqueue.c b/pjlib/src/pjlib-test/udp_echo_srv_ioqueue.c
index ee9120f2..217a8d87 100644
--- a/pjlib/src/pjlib-test/udp_echo_srv_ioqueue.c
+++ b/pjlib/src/pjlib-test/udp_echo_srv_ioqueue.c
@@ -22,6 +22,7 @@
static pj_ioqueue_key_t *key;
static pj_atomic_t *total_bytes;
+static pj_bool_t thread_quit_flag;
struct op_key
{
@@ -145,12 +146,12 @@ static int worker_thread(void *arg)
on_read_complete(key, &read_op.op_key_, length);
}
- for (;;) {
+ while (!thread_quit_flag) {
pj_time_val timeout;
timeout.sec = 0; timeout.msec = 10;
rc = pj_ioqueue_poll(ioqueue, &timeout);
}
- PJ_UNREACHED(return 0;)
+ return 0;
}
int udp_echo_srv_ioqueue(void)
diff --git a/pjlib/src/pjlib-test/udp_echo_srv_sync.c b/pjlib/src/pjlib-test/udp_echo_srv_sync.c
index 6a75a911..a5624208 100644
--- a/pjlib/src/pjlib-test/udp_echo_srv_sync.c
+++ b/pjlib/src/pjlib-test/udp_echo_srv_sync.c
@@ -21,6 +21,7 @@
#include <pjlib.h>
static pj_atomic_t *total_bytes;
+static pj_bool_t thread_quit_flag = 0;
static int worker_thread(void *arg)
{
@@ -28,7 +29,7 @@ static int worker_thread(void *arg)
char buf[512];
pj_status_t last_recv_err = PJ_SUCCESS, last_write_err = PJ_SUCCESS;
- for (;;) {
+ while (!thread_quit_flag) {
pj_ssize_t len;
pj_status_t rc;
pj_sockaddr_in addr;
@@ -56,7 +57,7 @@ static int worker_thread(void *arg)
continue;
}
}
- PJ_UNREACHED(return 0;)
+ return 0;
}
diff --git a/pjmedia/src/pjmedia/stream.c b/pjmedia/src/pjmedia/stream.c
index 667ce044..4db99de6 100644
--- a/pjmedia/src/pjmedia/stream.c
+++ b/pjmedia/src/pjmedia/stream.c
@@ -961,7 +961,7 @@ static pj_status_t send_rtcp(pjmedia_stream *stream,
PJ_PERROR(4,(stream->port.info.name.ptr, status,
"Error generating RTCP SDES"));
} else {
- len += sdes_len;
+ len += (int)sdes_len;
}
}
@@ -1019,7 +1019,7 @@ static pj_status_t send_rtcp(pjmedia_stream *stream,
PJ_PERROR(4,(stream->port.info.name.ptr, status,
"Error generating RTCP BYE"));
} else {
- len += bye_len;
+ len += (int)bye_len;
}
}
diff --git a/pjsip/src/pjsip/sip_resolve.c b/pjsip/src/pjsip/sip_resolve.c
index c4ef4d61..fb23b538 100644
--- a/pjsip/src/pjsip/sip_resolve.c
+++ b/pjsip/src/pjsip/sip_resolve.c
@@ -263,8 +263,14 @@ PJ_DEF(void) pjsip_resolve( pjsip_resolver_t *resolver,
/* Resolve */
count = 1;
status = pj_getaddrinfo(af, &target->addr.host, &count, &ai);
- if (status != PJ_SUCCESS)
+ if (status != PJ_SUCCESS) {
+ /* "Normalize" error to PJ_ERESOLVE. This is a special error
+ * because it will be translated to SIP status 502 by
+ * sip_transaction.c
+ */
+ status = PJ_ERESOLVE;
goto on_error;
+ }
svr_addr.entry[0].addr.addr.sa_family = (pj_uint16_t)af;
pj_memcpy(&svr_addr.entry[0].addr, &ai.ai_addr,