Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed evaluation variable at the end of string

  • Loading branch information...
commit 8494e179d14a0e2e78cb4570541996ab3b9549e6 1 parent e1650d8
@arut authored
View
8 ngx_rtmp_enotify_module.c
@@ -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"),
View
1  ngx_rtmp_eval.c
@@ -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);
}
View
6 ngx_rtmp_exec_module.c
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.