Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions pjsip-apps/src/pjsua/pjsua_app.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2008-2026 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
*
* This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -1998,9 +1998,7 @@ static pj_status_t app_init(void)
pjsua_transport_config udp_cfg;

udp_cfg = app_config.udp_cfg;
if (udp_cfg.port == 0)
udp_cfg.port = 5060;
else
if (udp_cfg.port != 0)
udp_cfg.port += 10;
status = pjsua_transport_create(type,
&udp_cfg,
Expand Down Expand Up @@ -2071,7 +2069,9 @@ static pj_status_t app_init(void)
pjsua_acc_id aid;
pjsip_transport_type_e type = PJSIP_TRANSPORT_TCP6;

tcp_cfg.port += 10;
if (tcp_cfg.port != 0) {
tcp_cfg.port += 10;
}

status = pjsua_transport_create(type,
&tcp_cfg,
Expand Down Expand Up @@ -2113,11 +2113,15 @@ static pj_status_t app_init(void)
sizeof(tcp_cfg.qos_params));

/* Set TLS port as TCP port+1 */
tcp_cfg.port++;
if (tcp_cfg.port != 0) {
tcp_cfg.port++;
}
status = pjsua_transport_create(PJSIP_TRANSPORT_TLS,
&tcp_cfg,
&transport_id);
tcp_cfg.port--;
if (tcp_cfg.port != 0) {
tcp_cfg.port--;
}
if (status != PJ_SUCCESS)
goto on_error;

Expand Down Expand Up @@ -2145,7 +2149,9 @@ static pj_status_t app_init(void)
pjsua_acc_id aid;
pjsip_transport_type_e type = PJSIP_TRANSPORT_TLS6;

tcp_cfg.port += 10;
if (tcp_cfg.port != 0) {
tcp_cfg.port += 10;
}

status = pjsua_transport_create(type,
&tcp_cfg,
Expand Down
Loading