[Groonga-commit] groonga/groonga at e70c346 [master] load: stop reading when it's canceled

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Mar 16 23:17:07 JST 2016


Kouhei Sutou	2016-03-16 23:17:07 +0900 (Wed, 16 Mar 2016)

  New Revision: e70c34646eefac2402020df253ba20a3f634ad08
  https://github.com/groonga/groonga/commit/e70c34646eefac2402020df253ba20a3f634ad08

  Message:
    load: stop reading when it's canceled

  Modified files:
    lib/proc.c

  Modified: lib/proc.c (+4 -0)
===================================================================
--- lib/proc.c    2016-03-16 22:55:43 +0900 (249d419)
+++ lib/proc.c    2016-03-16 23:17:07 +0900 (86eae1a)
@@ -139,6 +139,10 @@ proc_load(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_data)
            GRN_TEXT_VALUE(VAR(0)), GRN_TEXT_LEN(VAR(0)),
            GRN_TEXT_VALUE(VAR(3)), GRN_TEXT_LEN(VAR(3)),
            GRN_TEXT_VALUE(VAR(5)), GRN_TEXT_LEN(VAR(5)));
+  if (ctx->rc == GRN_CANCEL) {
+    ctx->impl->loader.stat = GRN_LOADER_END;
+    ctx->impl->loader.rc = GRN_SUCCESS;
+  }
   if (ctx->impl->loader.stat != GRN_LOADER_END) {
     grn_ctx_set_next_expr(ctx, grn_proc_get_info(ctx, user_data, NULL, NULL, NULL));
   } else {
-------------- next part --------------
HTML����������������������������...
Download 



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