Преглед изворни кода

fixed corruption of connection->log in log message when cleanup event is teared down way after the connection is dead

tags/v0.4
Brice Figureau пре 18 година
родитељ
комит
bdcfa7d6a6
1 измењених фајлова са 3 додато и 3 уклоњено
  1. 3
    3
      ngx_http_uploadprogress_module.c

+ 3
- 3
ngx_http_uploadprogress_module.c Прегледај датотеку

576
     if (!upcf->cleanup.timer_set) {
576
     if (!upcf->cleanup.timer_set) {
577
         upcf->cleanup.data = upcf->shm_zone;
577
         upcf->cleanup.data = upcf->shm_zone;
578
         upcf->cleanup.handler = ngx_clean_old_connections;
578
         upcf->cleanup.handler = ngx_clean_old_connections;
579
-        upcf->cleanup.log = r->connection->log;
579
+        upcf->cleanup.log = upcf->shm_zone->shm.log;
580
         ngx_add_timer(&upcf->cleanup, TIMER_FREQUENCY);
580
         ngx_add_timer(&upcf->cleanup, TIMER_FREQUENCY);
581
     }
581
     }
582
 
582
 
877
         if (!upcf->cleanup.timer_set) {
877
         if (!upcf->cleanup.timer_set) {
878
             upcf->cleanup.data = upcf->shm_zone;
878
             upcf->cleanup.data = upcf->shm_zone;
879
             upcf->cleanup.handler = ngx_clean_old_connections;
879
             upcf->cleanup.handler = ngx_clean_old_connections;
880
-            upcf->cleanup.log = r->connection->log;
880
+            upcf->cleanup.log = upcf->shm_zone->shm.log;
881
             ngx_add_timer(&upcf->cleanup, TIMER_FREQUENCY);
881
             ngx_add_timer(&upcf->cleanup, TIMER_FREQUENCY);
882
         }
882
         }
883
 
883
 
916
     *h = ngx_http_uploadprogress_handler;
916
     *h = ngx_http_uploadprogress_handler;
917
 
917
 
918
     /* 
918
     /* 
919
-       we also need to track HTTP 413 errors 
919
+       we also need to track HTTP errors 
920
        unfortunately, the above handler is not called in case of 
920
        unfortunately, the above handler is not called in case of 
921
        errors.
921
        errors.
922
        we have to register a header output filter that will be
922
        we have to register a header output filter that will be

Loading…
Откажи
Сачувај