Skip to content

Commit

Permalink
More fix compile warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nanangizz committed Feb 19, 2025
1 parent 46170d5 commit f0f281b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pjsip/src/pjsip/sip_auth_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const pjsip_auth_algorithm pjsip_auth_algorithms[] = {

#define DO_ON_PARENT_LOCKED(sess, call) \
do { \
pj_status_t on_parent; \
pj_status_t on_parent = PJ_SUCCESS; \
pj_bool_t with_parent = PJ_FALSE; \
if (sess->parent) { \
pj_lock_acquire(sess->parent->lock); \
Expand Down
2 changes: 1 addition & 1 deletion pjsip/src/pjsip/sip_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -1488,7 +1488,7 @@ PJ_DEF(pj_status_t) pjsip_transport_shutdown2(pjsip_transport *tp,
tp->is_shutdown = PJ_TRUE;

/* Notify application of transport shutdown */
state_cb = pjsip_tpmgr_get_state_cb(tp->tpmgr);
state_cb = pjsip_tpmgr_get_state_cb(mgr);
if (state_cb) {
pjsip_transport_state_info state_info;

Expand Down
3 changes: 2 additions & 1 deletion pjsip/src/pjsip/sip_transport_tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -931,9 +931,10 @@ static pj_status_t tls_create( struct tls_listener *listener,
}

if (addr) {
unsigned i;
pj_memcpy( &tls->server_addr, addr,
sizeof(pjsip_server_addresses));
for (int i = 0; i < addr->count; ++i) {
for (i = 0; i < addr->count; ++i) {
pj_strdup(pool, &tls->server_addr.entry[i].name, &addr->entry[i].name);
}
}
Expand Down
10 changes: 7 additions & 3 deletions pjsip/src/pjsip/sip_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1369,9 +1369,10 @@ stateless_send_resolver_callback( pj_status_t status,

/* Copy server addresses */
if (addr && addr != &tdata->dest_info.addr) {
unsigned i;
pj_memcpy( &tdata->dest_info.addr, addr,
sizeof(pjsip_server_addresses));
for (int i = 0; i < addr->count; ++i) {
for (i = 0; i < addr->count; ++i) {
pj_strdup(tdata->pool, &tdata->dest_info.addr.entry[i].name, &addr->entry[i].name);
}
}
Expand Down Expand Up @@ -1804,6 +1805,7 @@ static void send_response_resolver_cb( pj_status_t status, void *token,
const pjsip_server_addresses *addr )
{
pjsip_send_state *send_state = (pjsip_send_state*) token;
unsigned i;

if (status != PJ_SUCCESS) {
if (send_state->app_cb) {
Expand Down Expand Up @@ -1835,8 +1837,10 @@ static void send_response_resolver_cb( pj_status_t status, void *token,

/* Update address in send_state. */
pj_memcpy(&send_state->tdata->dest_info.addr, addr, sizeof(*addr));
for (int i = 0; i < send_state->tdata->dest_info.addr.count; ++i) {
pj_strdup(send_state->tdata->pool, &send_state->tdata->dest_info.addr.entry[i].name, &addr->entry[i].name);
for (i = 0; i < send_state->tdata->dest_info.addr.count; ++i) {
pj_strdup(send_state->tdata->pool,
&send_state->tdata->dest_info.addr.entry[i].name,
&addr->entry[i].name);
}

/* Send response using the transoprt. */
Expand Down

0 comments on commit f0f281b

Please sign in to comment.