Fixed bug in conference instantiation when max-ports is not properly set
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@247 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
parent
09e265014a
commit
f8baa875d2
|
@ -419,11 +419,19 @@ on_error:
|
|||
|
||||
static int PJ_THREAD_FUNC pjsua_poll(void *arg)
|
||||
{
|
||||
pj_status_t last_err = 0;
|
||||
|
||||
PJ_UNUSED_ARG(arg);
|
||||
|
||||
do {
|
||||
pj_time_val timeout = { 0, 10 };
|
||||
pjsip_endpt_handle_events (pjsua.endpt, &timeout);
|
||||
pj_status_t status;
|
||||
|
||||
status = pjsip_endpt_handle_events (pjsua.endpt, &timeout);
|
||||
if (status != last_err) {
|
||||
last_err = status;
|
||||
pjsua_perror(THIS_FILE, "handle_events() returned error", status);
|
||||
}
|
||||
} while (!pjsua.quit_flag);
|
||||
|
||||
return 0;
|
||||
|
@ -508,19 +516,6 @@ pj_status_t pjsua_init(void)
|
|||
return status;
|
||||
}
|
||||
|
||||
/* Init conference bridge. */
|
||||
|
||||
status = pjmedia_conf_create(pjsua.pool,
|
||||
pjsua.max_calls+PJSUA_CONF_MORE_PORTS,
|
||||
8000, 160, 16, &pjsua.mconf);
|
||||
if (status != PJ_SUCCESS) {
|
||||
pj_caching_pool_destroy(&pjsua.cp);
|
||||
pjsua_perror(THIS_FILE,
|
||||
"Media stack initialization has returned error",
|
||||
status);
|
||||
return status;
|
||||
}
|
||||
|
||||
/* Init pjmedia-codecs: */
|
||||
|
||||
status = pjmedia_codec_init(pjsua.med_endpt);
|
||||
|
@ -610,6 +605,19 @@ pj_status_t pjsua_start(void)
|
|||
pjsip_transport *udp_transport;
|
||||
pj_status_t status = PJ_SUCCESS;
|
||||
|
||||
/* Init conference bridge. */
|
||||
|
||||
status = pjmedia_conf_create(pjsua.pool,
|
||||
pjsua.max_calls+PJSUA_CONF_MORE_PORTS,
|
||||
8000, 160, 16, &pjsua.mconf);
|
||||
if (status != PJ_SUCCESS) {
|
||||
pj_caching_pool_destroy(&pjsua.cp);
|
||||
pjsua_perror(THIS_FILE,
|
||||
"Media stack initialization has returned error",
|
||||
status);
|
||||
return status;
|
||||
}
|
||||
|
||||
/* Create WAV file player if required: */
|
||||
|
||||
if (pjsua.wav_file) {
|
||||
|
|
Loading…
Reference in New Issue