Lines Matching refs:xstr
409 IWXSTR *xstr = 0; in _jbr_on_get() local
425 xstr = iwxstr_new2(jbl->bn.size * 2); in _jbr_on_get()
426 if (!xstr) { in _jbr_on_get()
430 rc = jbl_as_json(jbl, jbl_xstr_json_printer, xstr, JBL_PRINT_PRETTY); in _jbr_on_get()
435 xstr ? iwxstr_ptr(xstr) : 0, in _jbr_on_get()
436 xstr ? (int) iwxstr_size(xstr) : nbytes); in _jbr_on_get()
442 if (xstr) { in _jbr_on_get()
443 iwxstr_destroy(xstr); in _jbr_on_get()
458 IWXSTR *xstr = iwxstr_new2(jbl->bn.size * 2); in _jbr_on_options() local
459 if (!xstr) { in _jbr_on_options()
463 rc = jbl_as_json(jbl, jbl_xstr_json_printer, xstr, JBL_PRINT_PRETTY); in _jbr_on_options()
484 iwxstr_ptr(xstr), in _jbr_on_options()
485 iwxstr_size(xstr)); in _jbr_on_options()
491 if (xstr) { in _jbr_on_options()
492 iwxstr_destroy(xstr); in _jbr_on_options()
726 IWXSTR *xstr = iwxstr_new(); in _jbr_ws_send_error() local
727 if (!xstr) { in _jbr_ws_send_error()
733 rc = iwxstr_printf(xstr, "%s ERROR: %s %s", key, error, extra); in _jbr_ws_send_error()
735 rc = iwxstr_printf(xstr, "%s ERROR: %s", key, error); in _jbr_ws_send_error()
740 _jbr_ws_write_text(wctx->ws, iwxstr_ptr(xstr), iwxstr_size(xstr)); in _jbr_ws_send_error()
742 iwxstr_destroy(xstr); in _jbr_ws_send_error()
808 IWXSTR *xstr = iwxstr_new2(jbl->bn.size * 2); in _jbr_ws_get_document() local
809 if (!xstr) { in _jbr_ws_get_document()
817 rc = iwxstr_printf(xstr, "%s\t", pbuf); in _jbr_ws_get_document()
822 rc = jbl_as_json(jbl, jbl_xstr_json_printer, xstr, JBL_PRINT_PRETTY); in _jbr_ws_get_document()
827 _jbr_ws_write_text(wctx->ws, iwxstr_ptr(xstr), iwxstr_size(xstr)); in _jbr_ws_get_document()
830 iwxstr_destroy(xstr); in _jbr_ws_get_document()
1015 IWXSTR *xstr = iwxstr_new2(jbl->bn.size * 2); in _jbr_ws_info() local
1016 if (!xstr) { in _jbr_ws_info()
1020 rc = iwxstr_printf(xstr, "%s\t", key); in _jbr_ws_info()
1023 rc = jbl_as_json(jbl, jbl_xstr_json_printer, xstr, JBL_PRINT_PRETTY); in _jbr_ws_info()
1025 _jbr_ws_write_text(wctx->ws, iwxstr_ptr(xstr), iwxstr_size(xstr)); in _jbr_ws_info()
1032 if (xstr) { in _jbr_ws_info()
1033 iwxstr_destroy(xstr); in _jbr_ws_info()