FS-4505 --resolve
This commit is contained in:
parent
261868b1a8
commit
7fbc7c475a
|
@ -1048,6 +1048,10 @@ void rtmp_add_registration(rtmp_session_t *rsession, const char *auth, const cha
|
|||
|
||||
dup = strdup(auth);
|
||||
switch_split_user_domain(dup, &user, &domain);
|
||||
|
||||
|
||||
reg->user = switch_core_strdup(rsession->pool, user);
|
||||
reg->domain = switch_core_strdup(rsession->pool, domain);
|
||||
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "User", user);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Domain", domain);
|
||||
|
@ -1072,9 +1076,11 @@ static void rtmp_clear_reg_auth(rtmp_session_t *rsession, const char *auth, cons
|
|||
/* Replace hash entry by its next ptr */
|
||||
switch_core_hash_insert(rsession->profile->reg_hash, auth, reg->next);
|
||||
}
|
||||
|
||||
|
||||
if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, RTMP_EVENT_UNREGISTER) == SWITCH_STATUS_SUCCESS) {
|
||||
rtmp_event_fill(rsession, event);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "User", reg->user);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Domain", reg->domain);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Nickname", switch_str_nil(reg->nickname));
|
||||
switch_event_fire(&event);
|
||||
}
|
||||
|
|
|
@ -529,6 +529,8 @@ typedef struct rtmp_reg rtmp_reg_t;
|
|||
struct rtmp_reg {
|
||||
const char *uuid; /* < The rtmp session id */
|
||||
const char *nickname; /* < This instance's nickname, optional */
|
||||
const char *user;
|
||||
const char *domain;
|
||||
rtmp_reg_t *next; /* < Next entry */
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue