mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 09:36:46 +00:00
update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3385 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -250,7 +250,7 @@ ldl_status ldl_session_destroy(ldl_session_t **session_p)
|
||||
}
|
||||
|
||||
|
||||
ldl_status ldl_session_create(ldl_session_t **session_p, ldl_handle_t *handle, char *id, char *them, char *me)
|
||||
ldl_status ldl_session_create(ldl_session_t **session_p, ldl_handle_t *handle, char *id, char *them, char *me, ldl_user_flag_t flags)
|
||||
{
|
||||
ldl_session_t *session = NULL;
|
||||
|
||||
@@ -264,9 +264,9 @@ ldl_status ldl_session_create(ldl_session_t **session_p, ldl_handle_t *handle, c
|
||||
session->id = apr_pstrdup(session->pool, id);
|
||||
session->them = apr_pstrdup(session->pool, them);
|
||||
|
||||
if (me) {
|
||||
session->initiator = apr_pstrdup(session->pool, me);
|
||||
}
|
||||
|
||||
session->initiator = apr_pstrdup(session->pool, (flags & LDL_FLAG_OUTBOUND) ? me : them);
|
||||
|
||||
|
||||
if (ldl_test_flag(handle, LDL_FLAG_COMPONENT)) {
|
||||
session->login = apr_pstrdup(session->pool, me);
|
||||
@@ -298,7 +298,7 @@ static ldl_status parse_session_code(ldl_handle_t *handle, char *id, char *from,
|
||||
char *msg = NULL;
|
||||
|
||||
if (!(session = apr_hash_get(handle->sessions, id, APR_HASH_KEY_STRING))) {
|
||||
ldl_session_create(&session, handle, id, from, to);
|
||||
ldl_session_create(&session, handle, id, from, to, LDL_FLAG_NONE);
|
||||
if (!session) {
|
||||
return LDL_STATUS_MEMERR;
|
||||
}
|
||||
|
@@ -110,10 +110,12 @@ typedef enum {
|
||||
} ldl_flag_t;
|
||||
|
||||
typedef enum {
|
||||
LDL_FLAG_NONE = 0,
|
||||
LDL_FLAG_TLS = (1 << 10),
|
||||
LDL_FLAG_SASL_PLAIN = (1 << 11),
|
||||
LDL_FLAG_SASL_MD5 = (1 << 12),
|
||||
LDL_FLAG_COMPONENT = (1 << 13),
|
||||
LDL_FLAG_OUTBOUND = (1 << 14)
|
||||
} ldl_user_flag_t;
|
||||
|
||||
typedef enum {
|
||||
@@ -253,9 +255,10 @@ void ldl_session_set_value(ldl_session_t *session, char *key, char *val);
|
||||
\param id the id to use for the session
|
||||
\param them the id of the other end of the call
|
||||
\param me the id of our end of the call
|
||||
\param flags user flags
|
||||
\return SUCCESS OR FAILURE
|
||||
*/
|
||||
ldl_status ldl_session_create(ldl_session_t **session_p, ldl_handle_t *handle, char *id, char *them, char *me);
|
||||
ldl_status ldl_session_create(ldl_session_t **session_p, ldl_handle_t *handle, char *id, char *them, char *me, ldl_user_flag_t flags);
|
||||
|
||||
/*!
|
||||
\brief get the id of a session
|
||||
|
Reference in New Issue
Block a user