[Asterisk-code-review] res pjsip/config transport: Allow reloading transports. (asterisk[13])

Kevin Harwell asteriskteam at digium.com
Thu Feb 18 16:24:47 CST 2016


Kevin Harwell has posted comments on this change.

Change subject: res_pjsip/config_transport: Allow reloading transports.
......................................................................


Patch Set 10:

(2 comments)

https://gerrit.asterisk.org/#/c/2125/10/res/res_pjsip/config_transport.c
File res/res_pjsip/config_transport.c:

Line 483: 			usleep(100000);
As sleeping isn't ideal would it make sense to try to bind to it and if it fails try again until success, or 'n' retries or would that be plain silly? I worry if this amount of time is not enough on some systems.


Line 504: 		if (perm_state && perm_state->state && perm_state->state->factory && perm_state->state->factory->destroy) {
        : 			perm_state->state->factory->destroy(perm_state->state->factory);
        : 			usleep(100000);
        : 		}
        : 
        : 		pjsip_tcp_transport_cfg_default(&cfg, temp_state->state->host.addr.sa_family);
        : 		cfg.bind_addr = temp_state->state->host;
        : 		cfg.async_cnt = transport->async_operations;
        : 		set_qos(transport, &cfg.qos_params);
        : 
        : 		if (perm_state && perm_state->state && perm_state->state->factory && perm_state->state->factory->destroy) {
        : 			perm_state->state->factory->destroy(perm_state->state->factory);
        : 			usleep(100000);
        : 		}
I'm curious, why the same check twice?


-- 
To view, visit https://gerrit.asterisk.org/2125
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I5e759850e25958117d4c02f62ceb7244d7ec9edf
Gerrit-PatchSet: 10
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list