[Groonga-commit] groonga/groonga [master] httpd: just log

Back to archive index

null+****@clear***** null+****@clear*****
2012年 7月 25日 (水) 16:09:59 JST


Kouhei Sutou	2012-07-25 16:09:59 +0900 (Wed, 25 Jul 2012)

  New Revision: 2c121858c7594c96aceb1c305e594f796ee579c9
  https://github.com/groonga/groonga/commit/2c121858c7594c96aceb1c305e594f796ee579c9

  Log:
    httpd: just log

  Modified files:
    src/nginx-module/ngx_http_groonga_module.c

  Modified: src/nginx-module/ngx_http_groonga_module.c (+7 -8)
===================================================================
--- src/nginx-module/ngx_http_groonga_module.c    2012-07-25 16:08:27 +0900 (d52d44c)
+++ src/nginx-module/ngx_http_groonga_module.c    2012-07-25 16:09:59 +0900 (60a9942)
@@ -67,15 +67,14 @@ ngx_str_null_terminate(ngx_pool_t *pool, const ngx_str_t *string)
   return null_terminated_c_string;
 }
 
-static ngx_int_t
-ngx_http_groonga_context_check(ngx_log_t *log, grn_ctx *context)
+static void
+ngx_http_groonga_log_context_error(ngx_log_t *log, grn_ctx *context)
 {
   if (context->rc == GRN_SUCCESS) {
-    return NGX_OK;
-  } else {
-    ngx_log_error(NGX_LOG_ERR, log, 0, "%s", context->errbuf);
-    return NGX_HTTP_INTERNAL_SERVER_ERROR;
+    return;
   }
+
+  ngx_log_error(NGX_LOG_ERR, log, 0, "%s", context->errbuf);
 }
 
 static ngx_buf_t *
@@ -431,9 +430,9 @@ ngx_http_groonga_close_database_callback(ngx_http_groonga_loc_conf_t *location_c
   context = &(location_conf->context);
 
   grn_obj_close(context, grn_ctx_db(context));
-  ngx_http_groonga_context_check(data->log, context);
+  ngx_http_groonga_log_context_error(data->log, context);
   grn_ctx_fin(context);
-  ngx_http_groonga_context_check(data->log, context);
+  ngx_http_groonga_log_context_error(data->log, context);
 }
 
 static ngx_int_t
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
Download 



Groonga-commit メーリングリストの案内
Back to archive index