git-2.22.0/remote-curl.c
/*
 * A callback for CURLOPT_WRITEFUNCTION. The return value is the bytes consumed
 * from ptr.
 */
A callback for CURLOPT_WRITEFUNCTION. The return value is the bytes consumed
from ptr.
A callback for CURLOPT_WRITEFUNCTION . The return value is the bytes consumed from ptr .
static size_t rpc_in(char *ptr, size_t eltsize,
		size_t nmemb, void *buffer_)
{
	size_t size = eltsize * nmemb;
	struct rpc_in_data *data = buffer_;
	long response_code;
	if (curl_easy_getinfo(data->slot->curl, CURLINFO_RESPONSE_CODE,
			      &response_code) != CURLE_OK)
		return size;
	if (response_code >= 300)
		return size;
	if (size)
		data->rpc->any_written = 1;
	write_or_die(data->rpc->in, ptr, size);
	return size;
}
static size_t rpc_in ( char * ptr , size_t eltsize , size_t nmemb , void * buffer_ ) { size_t size = eltsize * nmemb ; struct rpc_in_data * data = buffer_ ; long response_code ; if ( curl_easy_getinfo ( data -> slot -> curl , CURLINFO_RESPONSE_CODE , & response_code ) != CURLE_OK ) return size ; if ( response_code >= 300 ) return size ; if ( size ) data -> rpc -> any_written = 1 ; write_or_die ( data -> rpc -> in , ptr , size ) ; return size ; }
A callback for CURLOPT_WRITEFUNCTION.
A callback for CURLOPT_WRITEFUNCTION .