static int run_slot(struct active_request_slot *slot, struct slot_results *results) { int err; struct slot_results results_buf; if (!results) results = &results_buf; err = run_one_slot(slot, results); if (err != HTTP_OK && err != HTTP_REAUTH) { struct strbuf msg = STRBUF_INIT; if (results->http_code && results->http_code != 200) strbuf_addf(&msg, "HTTP %ld", results->http_code); if (results->curl_result != CURLE_OK) { if (msg.len) strbuf_addch(&msg, ' '); strbuf_addf(&msg, "curl %d", results->curl_result); if (curl_errorstr[0]) { strbuf_addch(&msg, ' '); strbuf_addstr(&msg, curl_errorstr); } } error("RPC failed; %s", msg.buf); strbuf_release(&msg); } return err; }
static int run_slot(struct active_request_slot *slot, struct slot_results *results) { int err; struct slot_results results_buf; if (!results) results = &results_buf; err = run_one_slot(slot, results); if (err != HTTP_OK && err != HTTP_REAUTH) { error("RPC failed; result=%d, HTTP code = %ld", results->curl_result, results->http_code); } return err; }