Kouhei Sutou
null+****@clear*****
Sun Apr 3 00:53:15 JST 2016
Kouhei Sutou 2016-04-03 00:53:15 +0900 (Sun, 03 Apr 2016) New Revision: ecae2b2148ed3282a8d62e000937273fc16e0890 https://github.com/groonga/groonga/commit/ecae2b2148ed3282a8d62e000937273fc16e0890 Message: Generate request_id automatically when request_timeout is specified Modified files: lib/ctx.c Modified: lib/ctx.c (+6 -0) =================================================================== --- lib/ctx.c 2016-04-03 00:50:22 +0900 (80404a0) +++ lib/ctx.c 2016-04-03 00:53:15 +0900 (d25d740) @@ -1510,6 +1510,9 @@ grn_ctx_qe_exec_uri(grn_ctx *ctx, const char *path, uint32_t path_len) p = grn_text_cgidec(ctx, val, p, e, HTTP_QUERY_PAIRS_DELIMITERS); } } + if (request_timeout > 0 && GRN_TEXT_LEN(&request_id) == 0) { + grn_text_printf(ctx, &request_id, "%p", ctx); + } if (GRN_TEXT_LEN(&request_id) > 0) { GRN_TEXT_SET(ctx, &ctx->impl->current_request_id, GRN_TEXT_VALUE(&request_id), @@ -1627,6 +1630,9 @@ grn_ctx_qe_exec(grn_ctx *ctx, const char *str, uint32_t str_len) break; } } + if (request_timeout > 0 && GRN_TEXT_LEN(&request_id) == 0) { + grn_text_printf(ctx, &request_id, "%p", ctx); + } if (GRN_TEXT_LEN(&request_id) > 0) { GRN_TEXT_SET(ctx, &ctx->impl->current_request_id, GRN_TEXT_VALUE(&request_id), -------------- next part -------------- HTML����������������������������...다운로드