mirror of
https://github.com/zotanmew/nginx-rtmp-module.git
synced 2024-05-15 08:21:09 +02:00
fixed evaluation variable at the end of string
This commit is contained in:
parent
e1650d8629
commit
8494e179d1
|
@ -142,7 +142,7 @@ ngx_module_t ngx_rtmp_enotify_module = {
|
|||
|
||||
|
||||
static void
|
||||
ngx_rtmp_enotify_eval_cstr(ngx_rtmp_session_t *s, ngx_rtmp_eval_t *e,
|
||||
ngx_rtmp_enotify_eval_astr(ngx_rtmp_session_t *s, ngx_rtmp_eval_t *e,
|
||||
ngx_str_t *ret)
|
||||
{
|
||||
ngx_rtmp_enotify_ctx_t *ctx;
|
||||
|
@ -153,7 +153,7 @@ ngx_rtmp_enotify_eval_cstr(ngx_rtmp_session_t *s, ngx_rtmp_eval_t *e,
|
|||
return;
|
||||
}
|
||||
|
||||
ret->data = *(u_char **) ((u_char *) ctx + e->offset);
|
||||
ret->data = (u_char *) ctx + e->offset;
|
||||
ret->len = ngx_strlen(ret->data);
|
||||
}
|
||||
|
||||
|
@ -177,11 +177,11 @@ ngx_rtmp_enotify_eval_str(ngx_rtmp_session_t *s, ngx_rtmp_eval_t *e,
|
|||
static ngx_rtmp_eval_t ngx_rtmp_enotify_eval[] = {
|
||||
|
||||
{ ngx_string("name"),
|
||||
ngx_rtmp_enotify_eval_cstr,
|
||||
ngx_rtmp_enotify_eval_astr,
|
||||
offsetof(ngx_rtmp_enotify_ctx_t, name) },
|
||||
|
||||
{ ngx_string("args"),
|
||||
ngx_rtmp_enotify_eval_cstr,
|
||||
ngx_rtmp_enotify_eval_astr,
|
||||
offsetof(ngx_rtmp_enotify_ctx_t, args) },
|
||||
|
||||
{ ngx_string("path"),
|
||||
|
|
|
@ -173,6 +173,7 @@ ngx_rtmp_eval(ngx_rtmp_session_t *s, ngx_str_t *in, ngx_rtmp_eval_t **e,
|
|||
}
|
||||
|
||||
if (state == NAME) {
|
||||
p = &in->data[n];
|
||||
name.len = p - name.data;
|
||||
ngx_rtmp_eval_append_var(s, &b, e, &name);
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ ngx_module_t ngx_rtmp_exec_module = {
|
|||
|
||||
|
||||
static void
|
||||
ngx_rtmp_exec_eval_cstr(ngx_rtmp_session_t *s, ngx_rtmp_eval_t *e,
|
||||
ngx_rtmp_exec_eval_astr(ngx_rtmp_session_t *s, ngx_rtmp_eval_t *e,
|
||||
ngx_str_t *ret)
|
||||
{
|
||||
ngx_rtmp_exec_ctx_t *ctx;
|
||||
|
@ -134,7 +134,7 @@ ngx_rtmp_exec_eval_cstr(ngx_rtmp_session_t *s, ngx_rtmp_eval_t *e,
|
|||
return;
|
||||
}
|
||||
|
||||
ret->data = *(u_char **) ((u_char *) ctx + e->offset);
|
||||
ret->data = (u_char *) ctx + e->offset;
|
||||
ret->len = ngx_strlen(ret->data);
|
||||
}
|
||||
|
||||
|
@ -142,7 +142,7 @@ ngx_rtmp_exec_eval_cstr(ngx_rtmp_session_t *s, ngx_rtmp_eval_t *e,
|
|||
static ngx_rtmp_eval_t ngx_rtmp_exec_eval[] = {
|
||||
|
||||
{ ngx_string("name"),
|
||||
ngx_rtmp_exec_eval_cstr,
|
||||
ngx_rtmp_exec_eval_astr,
|
||||
offsetof(ngx_rtmp_exec_ctx_t, name) },
|
||||
|
||||
ngx_rtmp_null_eval
|
||||
|
|
Loading…
Reference in a new issue