Fix audio & video conference bridge: adding port may not update port counter#4164
Fix audio & video conference bridge: adding port may not update port counter#4164
Conversation
|
pjsua-test failed, and it seems genuine, already rerun it twice. |
I can't reproduce it here, only tried it on Windows though, also it seems to pass Linux test. Call stack: Here the Lines 180 to 182 in e111ef6 Call stack points to snprintf() and remote URI does have %:
Maybe it is not related to the new async conf? |
|
Just tried the failing Python test using this branch on MacOS (13.1/Intel), still not reproducible. |
|
Yes, that's strange, I also tried both tests here on my Mac and they completed successfully. But it's most certainly because of this PR since this is the only one that failed the CI tests in https://github.com/pjsip/pjproject/actions. I have also repeated the CI tests many times over the night and the failed results are consistent. |
|
Your intuition is correct. The '%' causes the issue. Although not sure why only in this PR it raises the error. Perhaps we should change it to Another potential issue is that |
Agree. But it may still have a problem, when the name accidentally has
Agree. |
…port name when it contains percent char
…counter (pjsip#4164) * Fix audio & video conference bridges, adding port may not update port counter. * Make sure pool name is NULL terminated, don't use remote URI as conf port name when it contains percent char
This is to fix #3928 (comment).
After investigation, it is caused by invalid port counter (e.g: zero or
-1while there are actually some ports added). Conference bridge uses the port counter to iterates the ports, so when it is invalid, no media flow will happen. Furthermore, such invalid port counter case may happen when a port is removed before the add port operation, including increasing the port counter, is completed. The add port operation can never be completed when no async operation is queued.This PR fix it by:
is_newis false).