Repository navigation
fix(pjsua): honour --rereg-delay for accounts given on the command line #5306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2186,7 +2186,6 @@ static pj_status_t app_init(void) | |
| /* Add accounts */ | ||
| for (i=0; i<app_config.acc_cnt; ++i) { | ||
| app_config.acc_cfg[i].rtp_cfg = app_config.rtp_cfg; | ||
| app_config.acc_cfg[i].reg_retry_interval = 300; | ||
| app_config.acc_cfg[i].reg_first_retry_interval = 60; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removing this changes the first retry after a failure from ~60 s (50–70 s with randomisation) to the library default of 0–10 s for every command-line account, which isn't needed to honour Suggest keeping this line and only dropping the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed, I've dropped that commit and left |
||
|
|
||
| app_config_init_video(&app_config.acc_cfg[i]); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this override gone,
--rereg-delay=0(or a non-numeric value, whichpj_strtoul()parses as 0) now setsreg_retry_intervalto 0, which disables auto re-registration entirely: after a 503/408 or a transport disconnect the account stays unregistered, with no error at startup. Previously this was masked by the hardcoded 300.Could we either validate the value in
OPT_REG_RETRY_INTERVAL(reject 0 / non-numeric), or document in the--rereg-delayhelp text that 0 disables re-registration?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. A 0 now reaches
reg_retry_interval, wherepjsua.hdocuments it as disabling auto re-registration, and the option could not produce 0 before because the app overwrote it. I've added a line to the--rereg-delayusage text saying so (2dcd7ca). I left non-numeric values alone:pj_strtoul()returns 0 for them and--reg-use-proxyis parsed the same way. Happy to reject them if you'd prefer.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for pointing out the jitter in your review. As you suggested it went separately: the issue is #5318 and the fix is #5319.