Skip to content

Commit 0a02801

Browse files
committed
Naming comventions change
1 parent ddfd4c1 commit 0a02801

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
USE_MD5=YES
22
USE_SHA1=YES
33
ngx_addon_name=ngx_http_upload_module
4-
HTTP_MODULES="$HTTP_MODULES ngx_http_upload_module ngx_http_unzip_filter_module ngx_upload_discard_filter_module"
5-
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_upload_module.c $ngx_addon_dir/ngx_http_unzip_filter_module.c $ngx_addon_dir/ngx_upload_discard_filter_module.c"
4+
HTTP_MODULES="$HTTP_MODULES ngx_http_upload_module ngx_upload_unzip_filter_module ngx_upload_discard_filter_module"
5+
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_upload_module.c $ngx_addon_dir/ngx_upload_unzip_filter_module.c $ngx_addon_dir/ngx_upload_discard_filter_module.c"
66
HTTP_INCS="$HTTP_INCS $ngx_addon_dir"

ngx_http_unzip_filter_module.c renamed to ngx_upload_unzip_filter_module.c

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ ngx_http_unzip_chain_copy_range(ngx_chain_t *chain, ngx_chain_t **copy, off_t *l
207207
void ngx_http_unzip_reclaim_chain(ngx_chain_t *cl, ngx_chain_t **free);
208208
void ngx_http_unzip_chain_advance(ngx_chain_t *chain, ngx_chain_t *copy);
209209

210-
static char * ngx_http_unzip_command(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
211-
static void *ngx_http_unzip_create_loc_conf(ngx_conf_t *cf);
210+
static char * ngx_upload_unzip_command(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
211+
static void *ngx_upload_unzip_create_loc_conf(ngx_conf_t *cf);
212212

213213
static ngx_int_t ngx_http_unzip_start_handler(ngx_http_upload_ctx_t *u);
214214
static void ngx_http_unzip_finish_handler(ngx_http_upload_ctx_t *u);
@@ -260,14 +260,14 @@ ngx_http_unzip_content_filter = {
260260

261261
static ngx_conf_post_handler_pt ngx_http_unzip_window_p = ngx_http_unzip_window;
262262

263-
static ngx_command_t ngx_http_unzip_filter_commands[] = { /* {{{ */
263+
static ngx_command_t ngx_upload_unzip_filter_commands[] = { /* {{{ */
264264

265265
/*
266266
* Enables unzipping of uploaded file
267267
*/
268268
{ ngx_string("upload_unzip"),
269269
NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
270-
ngx_http_unzip_command,
270+
ngx_upload_unzip_command,
271271
NGX_HTTP_LOC_CONF_OFFSET,
272272
0,
273273
NULL },
@@ -327,7 +327,7 @@ static ngx_command_t ngx_http_unzip_filter_commands[] = { /* {{{ */
327327
ngx_null_command
328328
}; /* }}} */
329329

330-
ngx_http_module_t ngx_http_unzip_filter_module_ctx = { /* {{{ */
330+
ngx_http_module_t ngx_upload_unzip_filter_module_ctx = { /* {{{ */
331331
NULL, /* preconfiguration */
332332
NULL, /* postconfiguration */
333333

@@ -337,14 +337,14 @@ ngx_http_module_t ngx_http_unzip_filter_module_ctx = { /* {{{ */
337337
NULL, /* create server configuration */
338338
NULL, /* merge server configuration */
339339

340-
ngx_http_unzip_create_loc_conf, /* create location configuration */
340+
ngx_upload_unzip_create_loc_conf, /* create location configuration */
341341
NULL /* merge location configuration */
342342
}; /* }}} */
343343

344-
ngx_module_t ngx_http_unzip_filter_module = { /* {{{ */
344+
ngx_module_t ngx_upload_unzip_filter_module = { /* {{{ */
345345
NGX_MODULE_V1,
346-
&ngx_http_unzip_filter_module_ctx, /* module context */
347-
ngx_http_unzip_filter_commands, /* module directives */
346+
&ngx_upload_unzip_filter_module_ctx, /* module context */
347+
ngx_upload_unzip_filter_commands, /* module directives */
348348
NGX_HTTP_MODULE, /* module type */
349349
NULL, /* init master */
350350
NULL, /* init module */
@@ -356,8 +356,8 @@ ngx_module_t ngx_http_unzip_filter_module = { /* {{{ */
356356
NGX_MODULE_V1_PADDING
357357
}; /* }}} */
358358

359-
static char * /* {{{ ngx_http_unzip_command */
360-
ngx_http_unzip_command(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
359+
static char * /* {{{ ngx_upload_unzip_command */
360+
ngx_upload_unzip_command(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
361361
{
362362
ngx_unzip_conf_t *uzcf = conf;
363363
ngx_http_upload_loc_conf_t *ulcf;
@@ -387,7 +387,7 @@ ngx_http_unzip_process_chain(ngx_unzip_ctx_t *ctx, ngx_chain_t *chain) {
387387
ngx_buf_t *buf;
388388
ngx_unzip_conf_t *uzcf;
389389

390-
uzcf = ngx_http_get_module_loc_conf(ctx->upload_ctx->request, ngx_http_unzip_filter_module);
390+
uzcf = ngx_http_get_module_loc_conf(ctx->upload_ctx->request, ngx_upload_unzip_filter_module);
391391

392392
while(chain != NULL) {
393393
for(buf = chain->buf ; buf->pos != buf->last ; buf->pos++) {
@@ -859,10 +859,10 @@ ngx_http_unzip_start_handler(ngx_http_upload_ctx_t *u) {
859859
ngx_unzip_ctx_t *ctx, *parent;
860860
ngx_http_upload_loc_conf_t *ulcf;
861861

862-
uzcf = ngx_http_get_module_loc_conf(u->request, ngx_http_unzip_filter_module);
862+
uzcf = ngx_http_get_module_loc_conf(u->request, ngx_upload_unzip_filter_module);
863863
ulcf = ngx_http_get_module_loc_conf(u->request, ngx_http_upload_module);
864864

865-
ctx = ngx_http_get_module_ctx(u->request, ngx_http_unzip_filter_module);
865+
ctx = ngx_http_get_module_ctx(u->request, ngx_upload_unzip_filter_module);
866866

867867
parent = ctx;
868868

@@ -878,7 +878,7 @@ ngx_http_unzip_start_handler(ngx_http_upload_ctx_t *u) {
878878

879879
ctx->parent = parent;
880880

881-
ngx_http_set_ctx(u->request, ctx, ngx_http_unzip_filter_module);
881+
ngx_http_set_ctx(u->request, ctx, ngx_upload_unzip_filter_module);
882882

883883
ctx->state = unzip_state_signature;
884884
ctx->upload_ctx = u;
@@ -910,7 +910,7 @@ static void /* {{{ ngx_http_unzip_finish_handler */
910910
ngx_http_unzip_finish_handler(ngx_http_upload_ctx_t *u) {
911911
ngx_unzip_ctx_t *ctx;
912912

913-
ctx = ngx_http_get_module_ctx(u->request, ngx_http_unzip_filter_module);
913+
ctx = ngx_http_get_module_ctx(u->request, ngx_upload_unzip_filter_module);
914914

915915
if (ctx->state == unzip_state_file_data) {
916916
if(!ctx->discard_data)
@@ -921,14 +921,14 @@ ngx_http_unzip_finish_handler(ngx_http_upload_ctx_t *u) {
921921

922922
ngx_upload_set_archive_path(u, &ctx->prev_archive_path);
923923

924-
ngx_http_set_ctx(u->request, ctx->parent, ngx_http_unzip_filter_module);
924+
ngx_http_set_ctx(u->request, ctx->parent, ngx_upload_unzip_filter_module);
925925
} /* }}} */
926926

927927
static void /* {{{ ngx_http_unzip_abort_handler */
928928
ngx_http_unzip_abort_handler(ngx_http_upload_ctx_t *u) {
929929
ngx_unzip_ctx_t *ctx;
930930

931-
ctx = ngx_http_get_module_ctx(u->request, ngx_http_unzip_filter_module);
931+
ctx = ngx_http_get_module_ctx(u->request, ngx_upload_unzip_filter_module);
932932

933933
if (ctx->state == unzip_state_file_data) {
934934
if(!ctx->discard_data)
@@ -939,20 +939,20 @@ ngx_http_unzip_abort_handler(ngx_http_upload_ctx_t *u) {
939939

940940
ngx_upload_set_archive_path(u, &ctx->prev_archive_path);
941941

942-
ngx_http_set_ctx(u->request, ctx->parent, ngx_http_unzip_filter_module);
942+
ngx_http_set_ctx(u->request, ctx->parent, ngx_upload_unzip_filter_module);
943943
} /* }}} */
944944

945945
static ngx_int_t /* {{{ ngx_http_unzip_data_handler */
946946
ngx_http_unzip_data_handler(ngx_http_upload_ctx_t *u, ngx_chain_t *chain) {
947947
ngx_unzip_ctx_t *ctx;
948948

949-
ctx = ngx_http_get_module_ctx(u->request, ngx_http_unzip_filter_module);
949+
ctx = ngx_http_get_module_ctx(u->request, ngx_upload_unzip_filter_module);
950950

951951
return ngx_http_unzip_process_chain(ctx, chain);
952952
} /* }}} */
953953

954-
static void * /* {{{ ngx_http_unzip_create_loc_conf */
955-
ngx_http_unzip_create_loc_conf(ngx_conf_t *cf)
954+
static void * /* {{{ ngx_upload_unzip_create_loc_conf */
955+
ngx_upload_unzip_create_loc_conf(ngx_conf_t *cf)
956956
{
957957
ngx_unzip_conf_t *conf;
958958

@@ -1028,7 +1028,7 @@ ngx_http_unzip_inflate_start(ngx_unzip_ctx_t *ctx) {
10281028
ctx->stream.avail_in = 0;
10291029
ctx->stream.next_in = Z_NULL;
10301030

1031-
uzcf = ngx_http_get_module_loc_conf(ctx->upload_ctx->request, ngx_http_unzip_filter_module);
1031+
uzcf = ngx_http_get_module_loc_conf(ctx->upload_ctx->request, ngx_upload_unzip_filter_module);
10321032

10331033
if(ctx->output_buffer == NULL) {
10341034
ctx->output_buffer = ngx_create_temp_buf(ctx->pool, uzcf->bufs.size);

0 commit comments

Comments
 (0)