]> granicus.if.org Git - apache/commitdiff
Added some more log numbers to log statements that
authorRainer Jung <rjung@apache.org>
Tue, 19 Jan 2016 15:43:17 +0000 (15:43 +0000)
committerRainer Jung <rjung@apache.org>
Tue, 19 Jan 2016 15:43:17 +0000 (15:43 +0000)
had none.

Those were not detected by the coccinelle script.
Only a few hard cases are remaining now.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725548 13f79535-47bb-0310-9956-ffa450edef68

13 files changed:
modules/examples/mod_example_hooks.c
modules/lua/lua_config.c
modules/lua/lua_request.c
modules/ssl/ssl_ct_util.c
server/mpm/event/event.c
server/mpm/motorz/motorz.c
server/mpm/prefork/prefork.c
server/mpm/simple/simple_run.c
server/mpm/worker/worker.c
server/request.c
server/util_expr_eval.c
server/util_expr_scan.c
server/util_expr_scan.l

index d818dc1f73a2bb8b7b6a9940d3689e4a7bad7a83..da00b8c7003717ef46b939cb9a241b06259d866c 100644 (file)
@@ -492,7 +492,8 @@ static void trace_nocontext(apr_pool_t *p, const char *file, int line,
      */
 
 #ifdef EXAMPLE_LOG_EACH
-    ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_NOTICE, 0, p, "%s", note);
+    ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_NOTICE, 0, p,
+                  APLOGNO(03297) "%s", note);
 #endif
 }
 
index 3b307ebc0e4d7ca2eaedbc1f745ea4e97b7f925c..bc09bdcffb444f10b7e9b83c49177a5763bddde1 100644 (file)
@@ -166,6 +166,7 @@ static int cmd_log_at(lua_State *L, int level)
     lua_getinfo(L, "Sl", &dbg);
 
     msg = luaL_checkstring(L, 2);
+    /* Intentional no APLOGNO */
     ap_log_error(dbg.source, dbg.currentline, APLOG_MODULE_INDEX, level, 0,
                  cmd->server, "%s", msg);
     return 0;
index 2364791deb51fd1622f8d804ba7b62039745d873..cb26e0549f276205612f306de48909e789fe4e9c 100644 (file)
@@ -1894,6 +1894,7 @@ static int req_log_at(lua_State *L, int level)
     lua_getinfo(L, "Sl", &dbg);
 
     msg = luaL_checkstring(L, 2);
+    /* Intentional no APLOGNO */
     ap_log_rerror(dbg.source, dbg.currentline, APLOG_MODULE_INDEX, level, 0,
                   r, "%s", msg);
     return 0;
index e84e980fe7a495b099c76208c269b1fba35843cd..4114bf6d1fb8a1ee571d22325cd678fe7905dc33 100644 (file)
@@ -467,9 +467,11 @@ void ctutil_log_array(const char *file, int line, int module_index,
     const char **elts = (const char **)arr->elts;
     int i;
 
+    /* Intentional no APLOGNO */
     ap_log_error(file, line, module_index, level,
                  0, s, "%s", desc);
     for (i = 0; i < arr->nelts; i++) {
+        /* Intentional no APLOGNO */
         ap_log_error(file, line, module_index, level,
                      0, s, ">>%s", elts[i]);
     }
index f7b9dd53721a6c15a768c3a06f1bbada67c6e954..d4f5c68b98eeaab9c19346d57caba69c3491aa9e 100644 (file)
@@ -1774,6 +1774,7 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
     rc = init_pollset(tpool);
     if (rc != APR_SUCCESS) {
         ap_log_error(APLOG_MARK, APLOG_ERR, rc, ap_server_conf,
+                     APLOGNO(03266)
                      "failed to initialize pollset, "
                      "attempting to shutdown process gracefully");
         signal_threads(ST_GRACEFUL);
@@ -1875,6 +1876,7 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
             }
             if (!APR_STATUS_IS_TIMEUP(rc)) {
                 ap_log_error(APLOG_MARK, APLOG_CRIT, rc, ap_server_conf,
+                             APLOGNO(03267)
                              "apr_pollset_poll failed.  Attempting to "
                              "shutdown process gracefully");
                 signal_threads(ST_GRACEFUL);
@@ -1962,6 +1964,7 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
                         disable_listensocks(process_slot);
                     listeners_disabled = 1;
                     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf,
+                                 APLOGNO(03268)
                                  "All workers busy, not accepting new conns "
                                  "in this process");
                 }
@@ -1975,6 +1978,7 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
                     if (!listeners_disabled)
                         disable_listensocks(process_slot);
                     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf,
+                                 APLOGNO(03269)
                                  "Too many open connections (%u), "
                                  "not accepting new conns in this process",
                                  apr_atomic_read32(&connection_count));
@@ -2189,6 +2193,7 @@ static void *APR_THREAD_FUNC worker_thread(apr_thread_t * thd, void *dummy)
             rv = ap_queue_info_set_idle(worker_queue_info, NULL);
             if (rv != APR_SUCCESS) {
                 ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
+                             APLOGNO(03270)
                              "ap_queue_info_set_idle failed. Attempting to "
                              "shutdown process gracefully.");
                 signal_threads(ST_GRACEFUL);
@@ -2431,6 +2436,7 @@ static void *APR_THREAD_FUNC start_threads(apr_thread_t * thd, void *dummy)
         if (loops % 120 == 0) { /* every couple of minutes */
             if (prev_threads_created == threads_created) {
                 ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf,
+                             APLOGNO(03271)
                              "child %" APR_PID_T_FMT " isn't taking over "
                              "slots very quickly (%d of %d)",
                              ap_my_pid, threads_created,
@@ -3309,7 +3315,7 @@ static int event_open_logs(apr_pool_t * p, apr_pool_t * plog,
 
     if ((num_listensocks = ap_setup_listeners(ap_server_conf)) < 1) {
         ap_log_error(APLOG_MARK, APLOG_ALERT | level_flags, 0,
-                     (startup ? NULL : s),
+                     (startup ? NULL : s), APLOGNO(03272)
                      "no listening sockets available, shutting down");
         return DONE;
     }
@@ -3324,7 +3330,7 @@ static int event_open_logs(apr_pool_t * p, apr_pool_t * plog,
     if ((rv = ap_duplicate_listeners(pconf, ap_server_conf,
                                      &listen_buckets, &num_buckets))) {
         ap_log_error(APLOG_MARK, APLOG_CRIT | level_flags, rv,
-                     (startup ? NULL : s),
+                     (startup ? NULL : s), APLOGNO(03273)
                      "could not duplicate listeners");
         return DONE;
     }
@@ -3333,7 +3339,7 @@ static int event_open_logs(apr_pool_t * p, apr_pool_t * plog,
     for (i = 0; i < num_buckets; i++) {
         if ((rv = ap_mpm_podx_open(pconf, &all_buckets[i].pod))) {
             ap_log_error(APLOG_MARK, APLOG_CRIT | level_flags, rv,
-                         (startup ? NULL : s),
+                         (startup ? NULL : s), APLOGNO(03274)
                          "could not open pipe-of-death");
             return DONE;
         }
index ac8cba7bd464cfbdfe704b7ae4510134c32d93ed..fadda46ee28ec3d29156ec9d6ad7a388f796e6f0 100644 (file)
@@ -1525,7 +1525,7 @@ static int motorz_open_logs(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
 
     if ((num_listensocks = ap_setup_listeners(ap_server_conf)) < 1) {
         ap_log_error(APLOG_MARK, APLOG_ALERT | level_flags, 0,
-                     (startup ? NULL : s),
+                     (startup ? NULL : s), APLOGNO(03275)
                      "no listening sockets available, shutting down");
         return DONE;
     }
@@ -1540,7 +1540,7 @@ static int motorz_open_logs(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
     if ((rv = ap_duplicate_listeners(pconf, ap_server_conf,
                                      &listen_buckets, &num_buckets))) {
         ap_log_error(APLOG_MARK, APLOG_CRIT | level_flags, rv,
-                     (startup ? NULL : s),
+                     (startup ? NULL : s), APLOGNO(03276)
                      "could not duplicate listeners");
         return DONE;
     }
@@ -1550,7 +1550,7 @@ static int motorz_open_logs(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
         if (!one_process && /* no POD in one_process mode */
                 (rv = ap_mpm_pod_open(pconf, &all_buckets[i].pod))) {
             ap_log_error(APLOG_MARK, APLOG_CRIT | level_flags, rv,
-                         (startup ? NULL : s),
+                         (startup ? NULL : s), APLOGNO(03277)
                          "could not open pipe-of-death");
             return DONE;
         }
@@ -1560,7 +1560,7 @@ static int motorz_open_logs(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
                                                     NULL, AP_ACCEPT_MUTEX_TYPE,
                                                     id, s, pconf, 0))))) {
             ap_log_error(APLOG_MARK, APLOG_CRIT | level_flags, rv,
-                         (startup ? NULL : s),
+                         (startup ? NULL : s), APLOGNO(03278)
                          "could not create accept mutex");
             return DONE;
         }
index f43d4f8465654b3e6139af685bd3686db97f3035..22245828d2c4119a83b8d9011299e5d668331d44 100644 (file)
@@ -1306,7 +1306,7 @@ static int prefork_open_logs(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
 
     if ((num_listensocks = ap_setup_listeners(ap_server_conf)) < 1) {
         ap_log_error(APLOG_MARK, APLOG_ALERT | level_flags, 0,
-                     (startup ? NULL : s),
+                     (startup ? NULL : s), APLOGNO(03279)
                      "no listening sockets available, shutting down");
         return DONE;
     }
@@ -1321,7 +1321,7 @@ static int prefork_open_logs(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
     if ((rv = ap_duplicate_listeners(pconf, ap_server_conf,
                                      &listen_buckets, &num_buckets))) {
         ap_log_error(APLOG_MARK, APLOG_CRIT | level_flags, rv,
-                     (startup ? NULL : s),
+                     (startup ? NULL : s), APLOGNO(03280)
                      "could not duplicate listeners");
         return DONE;
     }
@@ -1330,7 +1330,7 @@ static int prefork_open_logs(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
     for (i = 0; i < num_buckets; i++) {
         if ((rv = ap_mpm_pod_open(pconf, &all_buckets[i].pod))) {
             ap_log_error(APLOG_MARK, APLOG_CRIT | level_flags, rv,
-                         (startup ? NULL : s),
+                         (startup ? NULL : s), APLOGNO(03281)
                          "could not open pipe-of-death");
             return DONE;
         }
@@ -1340,7 +1340,7 @@ static int prefork_open_logs(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
                                                     NULL, AP_ACCEPT_MUTEX_TYPE,
                                                     id, s, pconf, 0))))) {
             ap_log_error(APLOG_MARK, APLOG_CRIT | level_flags, rv,
-                         (startup ? NULL : s),
+                         (startup ? NULL : s), APLOGNO(03282)
                          "could not create accept mutex");
             return DONE;
         }
@@ -1470,7 +1470,7 @@ static int prefork_check_config(apr_pool_t *p, apr_pool_t *plog,
             ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(03131)
                          " %d servers, decreasing MaxRequestWorkers to %d.",
                          server_limit, server_limit);
-            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
+            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(03283)
                          " To increase, please see the ServerLimit "
                          "directive.");
         } else {
index 65cde43ef38c533a028846cc289c67ecf7ef30a2..fc0be512e6e2f1d6c37747418c8cfd9510a6f7eb 100644 (file)
@@ -177,7 +177,7 @@ static int simple_run_loop(simple_core_t * sc)
 
         if (rv) {
             if (!APR_STATUS_IS_EINTR(rv) && !APR_STATUS_IS_TIMEUP(rv)) {
-                ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
+                ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL, APLOGNO(03284)
                              "simple_main_loop: apr_pollcb_poll failed");
                 return !OK;
             }
index db34292b70feb74d4b6bcbf1f64906b8bead7f62..d95374be65b541b3e971c8003a000dd8f8bfc490 100644 (file)
@@ -708,7 +708,7 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t *thd, void * dummy)
     rv = apr_pollset_create(&pollset, num_listensocks, tpool,
                             APR_POLLSET_NOCOPY);
     if (rv != APR_SUCCESS) {
-        ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
+        ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf, APLOGNO(03285)
                      "Couldn't create pollset in thread;"
                      " check system or user limits");
         /* let the parent decide how bad this really is */
@@ -725,7 +725,7 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t *thd, void * dummy)
 
         rv = apr_pollset_add(pollset, pfd);
         if (rv != APR_SUCCESS) {
-            ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
+            ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf, APLOGNO(03286)
                          "Couldn't create add listener to pollset;"
                          " check system or user limits");
             /* let the parent decide how bad this really is */
@@ -760,7 +760,7 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t *thd, void * dummy)
                 break; /* we've been signaled to die now */
             }
             else if (rv != APR_SUCCESS) {
-                ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
+                ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf, APLOGNO(03287)
                              "apr_queue_info_wait failed. Attempting to "
                              " shutdown process gracefully.");
                 signal_threads(ST_GRACEFUL);
@@ -942,7 +942,7 @@ static void * APR_THREAD_FUNC worker_thread(apr_thread_t *thd, void * dummy)
             rv = ap_queue_info_set_idle(worker_queue_info, last_ptrans);
             last_ptrans = NULL;
             if (rv != APR_SUCCESS) {
-                ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
+                ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf, APLOGNO(03288)
                              "ap_queue_info_set_idle failed. Attempting to "
                              "shutdown process gracefully.");
                 signal_threads(ST_GRACEFUL);
@@ -1120,7 +1120,7 @@ static void * APR_THREAD_FUNC start_threads(apr_thread_t *thd, void *dummy)
         ++loops;
         if (loops % 120 == 0) { /* every couple of minutes */
             if (prev_threads_created == threads_created) {
-                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf,
+                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(03289)
                              "child %" APR_PID_T_FMT " isn't taking over "
                              "slots very quickly (%d of %d)",
                              ap_my_pid, threads_created, threads_per_child);
@@ -2031,7 +2031,7 @@ static int worker_open_logs(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
 
     if ((num_listensocks = ap_setup_listeners(ap_server_conf)) < 1) {
         ap_log_error(APLOG_MARK, APLOG_ALERT | level_flags, 0,
-                     (startup ? NULL : s),
+                     (startup ? NULL : s), APLOGNO(03290)
                      "no listening sockets available, shutting down");
         return DONE;
     }
@@ -2046,7 +2046,7 @@ static int worker_open_logs(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
     if ((rv = ap_duplicate_listeners(pconf, ap_server_conf,
                                      &listen_buckets, &num_buckets))) {
         ap_log_error(APLOG_MARK, APLOG_CRIT | level_flags, rv,
-                     (startup ? NULL : s),
+                     (startup ? NULL : s), APLOGNO(03291)
                      "could not duplicate listeners");
         return DONE;
     }
@@ -2055,7 +2055,7 @@ static int worker_open_logs(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
     for (i = 0; i < num_buckets; i++) {
         if ((rv = ap_mpm_podx_open(pconf, &all_buckets[i].pod))) {
             ap_log_error(APLOG_MARK, APLOG_CRIT | level_flags, rv,
-                         (startup ? NULL : s),
+                         (startup ? NULL : s), APLOGNO(03292)
                          "could not open pipe-of-death");
             return DONE;
         }
@@ -2065,7 +2065,7 @@ static int worker_open_logs(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
                                                     NULL, AP_ACCEPT_MUTEX_TYPE,
                                                     id, s, pconf, 0))))) {
             ap_log_error(APLOG_MARK, APLOG_CRIT | level_flags, rv,
-                         (startup ? NULL : s),
+                         (startup ? NULL : s), APLOGNO(03293)
                          "could not create accept mutex");
             return DONE;
         }
@@ -2349,7 +2349,7 @@ static int worker_check_config(apr_pool_t *p, apr_pool_t *plog,
             ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(03151)
                          " would exceed ServerLimit of %d, decreasing to %d.",
                          server_limit, server_limit * threads_per_child);
-            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
+            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(03294)
                          " To increase, please see the ServerLimit "
                          "directive.");
         } else {
index de90dd9fcad1f64d82fd757ca9016b7549d360e1..e96e4f1888d1a7abf06ab2cb1c205df90acf3718 100644 (file)
@@ -1339,7 +1339,7 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r)
  x   if (r->finfo.filetype != APR_DIR
  x       && (res = resolve_symlink(r->filename, r->info, ap_allow_options(r),
  x                                 r->pool))) {
- x       ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ x       ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(03295)
  x                     "Symbolic link not allowed: %s", r->filename);
  x       return res;
  x   }
index 3479c9a57d181c0332ef8f8fdf178ff362ad12f6..5a8f207eadce51f96747cea189b9209004e9c2f7 100644 (file)
@@ -876,7 +876,8 @@ AP_DECLARE(int) ap_expr_exec_ctx(ap_expr_eval_ctx_t *ctx)
         *ctx->result_string = ap_expr_eval_word(ctx, ctx->info->root_node);
         if (*ctx->err != NULL) {
             ap_log_rerror(LOG_MARK(ctx->info), APLOG_ERR, 0, ctx->r,
-                          "Evaluation of expression from %s:%d failed: %s",
+                          APLOGNO(03298)
+                          "Evaluation of string expression from %s:%d failed: %s",
                           ctx->info->filename, ctx->info->line_number, *ctx->err);
             return -1;
         } else {
@@ -891,6 +892,7 @@ AP_DECLARE(int) ap_expr_exec_ctx(ap_expr_eval_ctx_t *ctx)
         rc = ap_expr_eval(ctx, ctx->info->root_node);
         if (*ctx->err != NULL) {
             ap_log_rerror(LOG_MARK(ctx->info), APLOG_ERR, 0, ctx->r,
+                          APLOGNO(03299)
                           "Evaluation of expression from %s:%d failed: %s",
                           ctx->info->filename, ctx->info->line_number, *ctx->err);
             return -1;
index 2510e6c9b3e92c29845b4c20273024e10fe95c2e..2f014e5ba1aa565901c466cfa8562e110e339bd2 100644 (file)
@@ -607,8 +607,9 @@ static yyconst flex_int16_t yy_chk[319] =
 #define YY_FATAL_ERROR(msg)                                     \
     do {                                                        \
         ap_log_error(APLOG_MARK, APLOG_CRIT, 0, ap_server_conf, \
-                      "expr parser fatal error (BUG?): "        \
-                      "%s, exiting", msg);                      \
+                     APLOGNO(03296)                             \
+                     "expr parser fatal error (BUG?): "         \
+                     "%s, exiting", msg);                       \
          abort();                                               \
     } while (0)
 
index a4c840e830d87c36a8ecdba66aa6474e6ad24cb9..f048d0dcf5c5d985c6f5ea736ee6a50cdccfcfa8 100644 (file)
@@ -68,8 +68,9 @@
 #define YY_FATAL_ERROR(msg)                                     \
     do {                                                        \
         ap_log_error(APLOG_MARK, APLOG_CRIT, 0, ap_server_conf, \
-                      "expr parser fatal error (BUG?): "        \
-                      "%s, exiting", msg);                      \
+                     APLOGNO(03296)                             \
+                     "expr parser fatal error (BUG?): "         \
+                     "%s, exiting", msg);                       \
          abort();                                               \
     } while (0)