MCPcopy Create free account
hub / github.com/git/git / rpc_in

Function rpc_in

remote-curl.c:828–846  ·  view source on GitHub ↗

* A callback for CURLOPT_WRITEFUNCTION. The return value is the bytes consumed * from ptr. */

Source from the content-addressed store, hash-verified

826 * from ptr.
827 */
828static size_t rpc_in(char *ptr, size_t eltsize,
829 size_t nmemb, void *buffer_)
830{
831 size_t size = eltsize * nmemb;
832 struct rpc_in_data *data = buffer_;
833 long response_code;
834
835 if (curl_easy_getinfo(data->slot->curl, CURLINFO_RESPONSE_CODE,
836 &response_code) != CURLE_OK)
837 return size;
838 if (response_code >= 300)
839 return size;
840 if (size)
841 data->rpc->any_written = 1;
842 if (data->check_pktline)
843 check_pktline(&data->pktline_state, ptr, size);
844 write_or_die(data->rpc->in, ptr, size);
845 return size;
846}
847
848static int run_slot(struct active_request_slot *slot,
849 struct slot_results *results)

Callers

nothing calls this directly

Calls 2

check_pktlineFunction · 0.85
write_or_dieFunction · 0.85

Tested by

no test coverage detected