Kouhei Sutou
null+****@clear*****
Thu Nov 22 09:20:48 JST 2012
Kouhei Sutou 2012-11-22 09:20:48 +0900 (Thu, 22 Nov 2012) New Revision: 649a2b6740c7d20363bab883e2b1998478de476c https://github.com/groonga/groonga/commit/649a2b6740c7d20363bab883e2b1998478de476c Log: gqtp: send error message as body on error Modified files: src/groonga.c Modified: src/groonga.c (+3 -0) =================================================================== --- src/groonga.c 2012-11-22 09:01:45 +0900 (fb91f40) +++ src/groonga.c 2012-11-22 09:20:48 +0900 (2d82972) @@ -1428,6 +1428,9 @@ g_output(grn_ctx *ctx, int flags, void *arg) msg->edge_id = req->edge_id; msg->header.proto = req->header.proto == GRN_COM_PROTO_MBREQ ? GRN_COM_PROTO_MBRES : req->header.proto; + if (ctx->rc != GRN_SUCCESS && GRN_BULK_VSIZE(ctx->impl->outbuf) == 0) { + grn_ctx_output_cstr(ctx, ctx->errbuf); + } if (grn_msg_send(ctx, (grn_obj *)msg, (flags & GRN_CTX_MORE) ? GRN_CTX_MORE : GRN_CTX_TAIL)) { edge->stat = EDGE_ABORT; -------------- next part -------------- HTML����������������������������... 다운로드