mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-07 10:48:06 +00:00
FS-4505 --resolve
This commit is contained in:
parent
47f614d40a
commit
210acdd165
src/mod/endpoints/mod_rtmp
@ -1048,6 +1048,10 @@ void rtmp_add_registration(rtmp_session_t *rsession, const char *auth, const cha
|
|||||||
|
|
||||||
dup = strdup(auth);
|
dup = strdup(auth);
|
||||||
switch_split_user_domain(dup, &user, &domain);
|
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, "User", user);
|
||||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Domain", domain);
|
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 */
|
/* Replace hash entry by its next ptr */
|
||||||
switch_core_hash_insert(rsession->profile->reg_hash, auth, reg->next);
|
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) {
|
if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, RTMP_EVENT_UNREGISTER) == SWITCH_STATUS_SUCCESS) {
|
||||||
rtmp_event_fill(rsession, event);
|
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_add_header_string(event, SWITCH_STACK_BOTTOM, "Nickname", switch_str_nil(reg->nickname));
|
||||||
switch_event_fire(&event);
|
switch_event_fire(&event);
|
||||||
}
|
}
|
||||||
|
@ -529,6 +529,8 @@ typedef struct rtmp_reg rtmp_reg_t;
|
|||||||
struct rtmp_reg {
|
struct rtmp_reg {
|
||||||
const char *uuid; /* < The rtmp session id */
|
const char *uuid; /* < The rtmp session id */
|
||||||
const char *nickname; /* < This instance's nickname, optional */
|
const char *nickname; /* < This instance's nickname, optional */
|
||||||
|
const char *user;
|
||||||
|
const char *domain;
|
||||||
rtmp_reg_t *next; /* < Next entry */
|
rtmp_reg_t *next; /* < Next entry */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user