[ANN] nginx_uploadprogress_module v0.1

Evan Miller emiller at imvu.com
Tue Oct 9 21:47:34 MSD 2007


This bit me before. Passing the wrong # of arguments to a debug function 
  will cause the compile to fail unless "--with-debug" was passed to 
./configure. Authors of modules should be sure to compile both with and 
without the debug module enabled.

Evan

Brice Figureau wrote:
> On Tue, 2007-10-09 at 14:34 +0200, Otto Bretz wrote:
>> Brice Figureau wrote:
>>> Hi,
>>>
>>> I'm proud to announce the availability of the first version of
>>> nginx_uploadprogress_module (v0.1).
> [snip]
>> Any idea what's going wrong? I've tried to build on both OpenBSD and 
>> OSX, same errors. The configure scripts detects variadic macros:
>> checking for gcc variadic macros ... found
>> checking for C99 variadic macros ... found
>> and nginx compiles fine if I disable the uploadprogress module.
> 
> I fixed this issue, if you don't want to wait the upcoming version 0.2
> (available later this week), here is a patch to apply.
> 
> You can apply it by using: 
> patch -p0 < ngx_uploadprogress-fixes-ngx_debug_log.patch
> in the nginx_uploadprogress_module directory...
> 
> Hope this helps,
> 
> 
> ------------------------------------------------------------------------
> 
> --- ngx_http_uploadprogress_module.c.orig	2007-10-09 16:02:14.000000000 +0200
> +++ ngx_http_uploadprogress_module.c	2007-10-09 16:01:40.000000000 +0200
> @@ -259,7 +259,7 @@
>              continue;
>          }
>  
> -        ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
> +        ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
>                         "reportuploads found matching hash %08XD, node %p for id: %V",
>                         hash, node, id);
>  
> @@ -544,7 +544,7 @@
>              rc = ngx_memn2cmp(id->data, lz->data, id->len, (size_t) lz->len);
>  
>              if (rc == 0) {
> -                ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
> +                ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
>                                 "trackuploads already registered: %V", id);
>                  /* oops found already one */
>                  ngx_shmtx_unlock(&shpool->mutex);
> @@ -807,7 +807,7 @@
>      }
>  
>      ngx_log_debug2(NGX_LOG_DEBUG_HTTP, cf->log, 0,
> -                   "ngx_upload_progress name: %V, szhm_zone: %p", value[1],
> +                   "ngx_upload_progress name: %V, szhm_zone: %p", &value[1],
>                     shm_zone);
>  
>      if (shm_zone->data) {
> @@ -835,7 +835,7 @@
>      value = cf->args->elts;
>  
>      ngx_log_debug1(NGX_LOG_DEBUG_HTTP, cf->log, 0, "ngx_track_uploads name: %V",
> -                   value[1]);
> +                   &value[1]);
>  
>      lzcf->shm_zone =
>          ngx_shared_memory_add(cf, &value[1], 0, &ngx_http_uploadprogress_module);
> @@ -845,8 +845,8 @@
>  
>      lzcf->track = (u_char) 1;
>  
> -    ngx_log_debug1(NGX_LOG_DEBUG_HTTP, cf->log, 0,
> -                   "ngx_track_uploads name: %V,szhm_zone: %p", value[1],
> +    ngx_log_debug2(NGX_LOG_DEBUG_HTTP, cf->log, 0,
> +                   "ngx_track_uploads name: %V,szhm_zone: %p", &value[1],
>                     lzcf->shm_zone);
>  
>      return NGX_CONF_OK;
> @@ -865,7 +865,7 @@
>      value = cf->args->elts;
>  
>      ngx_log_debug1(NGX_LOG_DEBUG_HTTP, cf->log, 0, "ngx_report_uploads name: %V",
> -                   value[1]);
> +                   &value[1]);
>  
>      lzcf->shm_zone =
>          ngx_shared_memory_add(cf, &value[1], 0, &ngx_http_uploadprogress_module);
> @@ -873,8 +873,8 @@
>          return NGX_CONF_ERROR;
>      }
>  
> -    ngx_log_debug1(NGX_LOG_DEBUG_HTTP, cf->log, 0,
> -                   "ngx_report_uploads name: %V, szhm_zone: %p", value[1],
> +    ngx_log_debug2(NGX_LOG_DEBUG_HTTP, cf->log, 0,
> +                   "ngx_report_uploads name: %V, szhm_zone: %p", &value[1],
>                     lzcf->shm_zone);
>  
>      lzcf->track = (u_char) 0;







More information about the nginx mailing list