[Groonga-commit] groonga/groonga at 820419c [master] Add missing request_timer_init/fun calls

Back to archive index

Kouhei Sutou null+****@clear*****
Sun Apr 3 11:19:24 JST 2016


Kouhei Sutou	2016-04-03 11:19:24 +0900 (Sun, 03 Apr 2016)

  New Revision: 820419c3cb92650dba30860303aa809ca83ec8f1
  https://github.com/groonga/groonga/commit/820419c3cb92650dba30860303aa809ca83ec8f1

  Message:
    Add missing request_timer_init/fun calls

  Modified files:
    lib/ctx.c

  Modified: lib/ctx.c (+10 -0)
===================================================================
--- lib/ctx.c    2016-04-03 01:15:29 +0900 (cc6b045)
+++ lib/ctx.c    2016-04-03 11:19:24 +0900 (4ddd25b)
@@ -19,6 +19,7 @@
 #include "grn.h"
 #include <string.h>
 #include "grn_request_canceler.h"
+#include "grn_request_timer.h"
 #include "grn_tokenizers.h"
 #include "grn_ctx_impl.h"
 #include "grn_ii.h"
@@ -1036,10 +1037,18 @@ grn_init(void)
             "failed to initialize request canceler (%d)", rc);
     goto fail_request_canceler;
   }
+  if (!grn_request_timer_init()) {
+    rc = ctx->rc;
+    GRN_LOG(ctx, GRN_LOG_ALERT,
+            "failed to initialize request timer (%d)", rc);
+    goto fail_request_timer;
+  }
   GRN_LOG(ctx, GRN_LOG_NOTICE, "grn_init: <%s>", grn_get_version());
   check_overcommit_memory(ctx);
   return rc;
 
+fail_request_timer:
+  grn_request_canceler_fin();
 fail_request_canceler:
   grn_cache_fin();
 fail_tokenizer:
@@ -1142,6 +1151,7 @@ grn_fin(void)
     }
   }
   grn_query_logger_fin(ctx);
+  grn_request_timer_fin();
   grn_request_canceler_fin();
   grn_cache_fin();
   grn_tokenizers_fin();
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index