Skip to content

Commit

Permalink
Merge pull request #37 from lynch1981/master
Browse files Browse the repository at this point in the history
Fix minor bugs
  • Loading branch information
simpl authored Nov 15, 2023
2 parents b4642d6 + 7e524bd commit 91e30eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/ndk_complex_path.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ ndk_conf_set_http_complex_path_slot (ngx_conf_t *cf, ngx_command_t *cmd, void *c
char *p = conf;

ngx_str_t *path;
ngx_array_t *a;
ngx_conf_post_t *post;
ndk_http_complex_path_t *cp;

Expand All @@ -113,13 +112,14 @@ ndk_conf_set_http_complex_path_slot (ngx_conf_t *cf, ngx_command_t *cmd, void *c
path++;

cp->a = ndk_http_complex_path_create_compile (cf, path, cp->prefix);
if (cp->a == NULL)
if (cp->a == NULL) {
/* TODO : log */
return NGX_CONF_ERROR;
}

if (cmd->post) {
post = cmd->post;
return post->post_handler (cf, post, a);
return post->post_handler (cf, post, cp->a);
}

return NGX_CONF_OK;
Expand Down
2 changes: 1 addition & 1 deletion src/ndk_string_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@

#define ngx_null_enum { ngx_null_string, 0 }

#define ndk_memcpyp(d,s) ngx_memcpy(d,s,sizeof(s))
#define ndk_memcpyp(d,s) ngx_memcpy(d,s,sizeof(*s))

0 comments on commit 91e30eb

Please sign in to comment.