[Groonga-commit] groonga/groonga at 3988dcb [master] http: add missing error checks while POST

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Mar 9 17:12:52 JST 2016


Kouhei Sutou	2016-03-09 17:12:52 +0900 (Wed, 09 Mar 2016)

  New Revision: 3988dcbed9e0777be757aec0a960293ae068a4a2
  https://github.com/groonga/groonga/commit/3988dcbed9e0777be757aec0a960293ae068a4a2

  Message:
    http: add missing error checks while POST

  Modified files:
    src/groonga.c

  Modified: src/groonga.c (+5 -1)
===================================================================
--- src/groonga.c    2016-03-09 17:07:29 +0900 (b158676)
+++ src/groonga.c    2016-03-09 17:12:52 +0900 (4d8b7e4)
@@ -1353,9 +1353,13 @@ do_htreq_post(grn_ctx *ctx, grn_msg *msg)
                      buffer_start, buffer_end - buffer_start);
       }
 #undef POST_BUFFER_SIZE
+
+      if (ctx->rc != GRN_SUCCESS) {
+        break;
+      }
     }
 
-    if (GRN_TEXT_LEN(&chunk_buffer) > 0) {
+    if (ctx->rc == GRN_SUCCESS && GRN_TEXT_LEN(&chunk_buffer) > 0) {
       grn_ctx_send(ctx,
                    GRN_TEXT_VALUE(&chunk_buffer),
                    GRN_TEXT_LEN(&chunk_buffer),
-------------- next part --------------
HTML����������������������������...
下载 



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