FS-4505 --resolve

This commit is contained in:
Anthony Minessale 2012-08-08 10:08:29 -05:00
parent 47f614d40a
commit 210acdd165
2 changed files with 9 additions and 1 deletions

View File

@ -1049,6 +1049,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);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Nickname", switch_str_nil(nickname)); switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Nickname", switch_str_nil(nickname));
@ -1075,6 +1079,8 @@ static void rtmp_clear_reg_auth(rtmp_session_t *rsession, const char *auth, cons
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);
} }

View File

@ -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 */
}; };