Miscellaneous fixes (#3280)

* Suppress compile warnings
* Disable ioqueue stress test on VS2005 due to compile errors on structure data initialization (using C99 way, while VS2005 does not seem to support it).
remotes/origin/expand-tab-to-spaces-2
Nanang Izzuddin 2 years ago committed by GitHub
parent b7aff72764
commit d00fc12807
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1078,6 +1078,7 @@ static void set_dh_use_option(BIO *bio, const pj_ssl_sock_t* ssock,
}
DH_free(dh);
}
PJ_UNUSED_ARG(pass);
#else
OSSL_DECODER_CTX* dctx;
EVP_PKEY* dh_pkey = NULL;

@ -19,8 +19,18 @@
*/
#include "test.h"
#include <pjlib.h>
#ifdef _MSC_VER
# pragma warning(disable:4127)
/* Disable ioqueue stress test on MSVC2005, due to compile errors on
* structure field assignments.
*/
# if _MSC_VER <= 1400
# undef INCLUDE_IOQUEUE_STRESS_TEST
# define INCLUDE_IOQUEUE_STRESS_TEST 0
# endif
#endif
#define DO_TEST(test) do { \

@ -290,7 +290,7 @@ static pj_status_t create_rtp_rtcp_sock(pjsua_call_media *call_med,
if (acc->next_rtp_port == 0 || cfg->port == 0) {
if (cfg->port != 0 && cfg->port_range != 0 && cfg->randomize_port) {
unsigned offset = ((pj_rand() % (cfg->port_range)) / 2) * 2;
acc->next_rtp_port = (pj_uint16_t)cfg->port + offset;
acc->next_rtp_port = (pj_uint16_t)(cfg->port + offset);
} else {
acc->next_rtp_port = (pj_uint16_t)cfg->port;
}
@ -731,7 +731,7 @@ static pj_status_t create_loop_media_transport(
if (acc->next_rtp_port == 0 || cfg->port == 0) {
if (cfg->port != 0 && cfg->port_range != 0 && cfg->randomize_port) {
unsigned offset = ((pj_rand() % (cfg->port_range)) / 2) * 2;
acc->next_rtp_port = (pj_uint16_t)cfg->port + offset;
acc->next_rtp_port = (pj_uint16_t)(cfg->port + offset);
} else {
acc->next_rtp_port = (pj_uint16_t)cfg->port;
}

@ -560,10 +560,11 @@ static void send_response_callback( pj_timer_heap_t *timer_heap,
{
struct response *r = (struct response*) entry->user_data;
pjsip_transport *tp = r->res_addr.transport;
pj_status_t status;
PJ_UNUSED_ARG(timer_heap);
pj_status_t status = pjsip_endpt_send_response(endpt, &r->res_addr, r->tdata, NULL, NULL);
status = pjsip_endpt_send_response(endpt, &r->res_addr, r->tdata, NULL, NULL);
if (status != PJ_SUCCESS) pjsip_tx_data_dec_ref(r->tdata);
if (tp)
pjsip_transport_dec_ref(tp);

Loading…
Cancel
Save