Skip to content

Commit

Permalink
added 'args' argument to exec
Browse files Browse the repository at this point in the history
  • Loading branch information
arut committed May 26, 2013
1 parent 22984bc commit 613234b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ngx_rtmp_exec_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ typedef struct {

typedef struct {
u_char name[NGX_RTMP_MAX_NAME];
u_char args[NGX_RTMP_MAX_ARGS];
ngx_array_t execs;
} ngx_rtmp_exec_ctx_t;

Expand Down Expand Up @@ -174,6 +175,10 @@ static ngx_rtmp_eval_t ngx_rtmp_exec_eval[] = {
ngx_rtmp_exec_eval_astr,
offsetof(ngx_rtmp_exec_ctx_t, name) },

{ ngx_string("args"),
ngx_rtmp_exec_eval_astr,
offsetof(ngx_rtmp_exec_ctx_t, args) },

ngx_rtmp_null_eval
};

Expand Down Expand Up @@ -653,6 +658,7 @@ ngx_rtmp_exec_publish(ngx_rtmp_session_t *s, ngx_rtmp_publish_t *v)
}

ngx_memcpy(ctx->name, v->name, NGX_RTMP_MAX_NAME);
ngx_memcpy(ctx->args, v->args, NGX_RTMP_MAX_ARGS);

ngx_log_debug1(NGX_LOG_DEBUG_RTMP, s->connection->log, 0,
"exec: run %uz command(s)", ctx->execs.nelts);
Expand Down

0 comments on commit 613234b

Please sign in to comment.