mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1171 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -237,6 +237,7 @@ static ldl_status parse_session_code(ldl_handle_t *handle, char *id, char *from,
|
||||
ldl_session_t *session = NULL;
|
||||
ldl_signal_t signal = LDL_SIGNAL_NONE;
|
||||
char *initiator = iks_find_attrib(xml, "initiator");
|
||||
char *msg = NULL;
|
||||
|
||||
if (!(session = apr_hash_get(handle->sessions, id, APR_HASH_KEY_STRING))) {
|
||||
ldl_session_create(&session, handle, id, from, initiator);
|
||||
@@ -261,10 +262,13 @@ static ldl_status parse_session_code(ldl_handle_t *handle, char *id, char *from,
|
||||
iks *tag;
|
||||
|
||||
if (type) {
|
||||
|
||||
if (!strcasecmp(type, "initiate") || !strcasecmp(type, "accept")) {
|
||||
|
||||
signal = LDL_SIGNAL_INITIATE;
|
||||
|
||||
if (!strcasecmp(type, "accept")) {
|
||||
msg = "accept";
|
||||
}
|
||||
if (!session->initiator && initiator) {
|
||||
session->initiator = apr_pstrdup(session->pool, initiator);
|
||||
}
|
||||
@@ -382,7 +386,7 @@ static ldl_status parse_session_code(ldl_handle_t *handle, char *id, char *from,
|
||||
}
|
||||
|
||||
if (handle->session_callback && signal) {
|
||||
handle->session_callback(handle, session, signal, NULL);
|
||||
handle->session_callback(handle, session, signal, msg);
|
||||
}
|
||||
|
||||
return LDL_STATUS_SUCCESS;
|
||||
|
Reference in New Issue
Block a user