chat_connect connection was established only after next user joined the conference
This commit is contained in:
parent
c8baf15baa
commit
47a34d4bb9
|
@ -564,7 +564,7 @@ struct capi_pvt {
|
|||
#endif
|
||||
/* Connection between two conference rooms. NULL PLCI */
|
||||
struct capi_pvt *bridgePeer;
|
||||
|
||||
|
||||
/*! Next channel in list */
|
||||
struct capi_pvt *next;
|
||||
};
|
||||
|
|
|
@ -1337,16 +1337,19 @@ pbx_capi_create_conference_bridge(const char* mainName,
|
|||
(mainController == 0) || (additionalController == 0))
|
||||
return NULL;
|
||||
|
||||
pbx_capi_nulliflist_lock();
|
||||
for (i = 0, error = 0; (error == 0) && (i < sizeof(name)/sizeof(name[0])); i++) {
|
||||
capi_ifc[i] = capi_mknullif(NULL, controller[i]);
|
||||
error |= (capi_ifc[i] == NULL);
|
||||
}
|
||||
if (error == 0) {
|
||||
cc_mutex_lock(&capi_ifc[0]->lock);
|
||||
capi_ifc[0]->bridgePeer = capi_ifc[1];
|
||||
cc_mutex_unlock(&capi_ifc[0]->lock);
|
||||
|
||||
cc_mutex_lock(&capi_ifc[1]->lock);
|
||||
capi_ifc[1]->bridgePeer = capi_ifc[0];
|
||||
cc_mutex_unlock(&capi_ifc[1]->lock);
|
||||
}
|
||||
pbx_capi_nulliflist_unlock();
|
||||
|
||||
for (i = 0; (error == 0) && (i < sizeof(name)/sizeof(name[0])); i++) {
|
||||
room[i] = add_chat_member(name[i], capi_ifc[i], RoomMemberOperator);
|
||||
|
|
|
@ -244,12 +244,24 @@ struct capi_pvt *capi_mknullif(struct ast_channel *c, unsigned long long control
|
|||
}
|
||||
#endif
|
||||
|
||||
capi_sendf(NULL, 0, CAPI_CONNECT_REQ, controller, tmp->MessageNumber,
|
||||
if (c == NULL) {
|
||||
cc_mutex_lock(&tmp->lock);
|
||||
}
|
||||
capi_sendf((c != NULL) ? NULL : tmp, c == NULL, CAPI_CONNECT_REQ, controller, tmp->MessageNumber,
|
||||
"w()()()()(www()()()())()()()((wwbbb)()()())",
|
||||
0, 1,1,0, 3,0,0,0,0);
|
||||
|
||||
cc_verbose(3, 1, VERBOSE_PREFIX_4 "%s: created null-interface on controller %d.\n",
|
||||
tmp->vname, tmp->controller);
|
||||
if (c == NULL) {
|
||||
cc_mutex_unlock(&tmp->lock);
|
||||
if (tmp->PLCI == 0) {
|
||||
cc_log(LOG_WARNING, "%s: failed to create\n", tmp->vname);
|
||||
capi_remove_nullif(tmp);
|
||||
tmp = NULL;
|
||||
}
|
||||
}
|
||||
if (tmp != NULL) {
|
||||
cc_verbose(3, 1, VERBOSE_PREFIX_4 "%s: created null-interface on controller %d.\n",
|
||||
tmp->vname, tmp->controller);
|
||||
}
|
||||
|
||||
return tmp;
|
||||
}
|
||||
|
|
|
@ -91,6 +91,8 @@ static int divaStreamingMessageRx (void* user_context, dword message, dword leng
|
|||
8U << 8 | DIVA_STREAM_MESSAGE_TX_IDI_REQUEST,
|
||||
b3buf, b3len);
|
||||
bridgePeer->diva_stream_entry->diva_stream->flush_stream(bridgePeer->diva_stream_entry->diva_stream);
|
||||
} else {
|
||||
DBG_ERR(("DROP BRIDGE PACKET"))
|
||||
}
|
||||
} else {
|
||||
capidev_handle_data_b3_indication_vector (pE->i, vind, vind_nr);
|
||||
|
|
Loading…
Reference in New Issue