MCPcopy Create free account
hub / github.com/alibaba/CicadaPlayer / getErrorCode

Function getErrorCode

framework/data_source/curl/CURLConnection2.cpp:39–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37 } while (0)
38
39static int getErrorCode(const CURLcode &CURLResult)
40{
41 if (CURLResult == CURLE_COULDNT_RESOLVE_HOST) {
42 return gen_framework_errno(error_class_network, network_errno_resolve);
43 }
44
45 if (CURLResult == CURLE_COULDNT_CONNECT) return gen_framework_errno(error_class_network, network_errno_could_not_connect);
46
47 if (CURLResult == CURLE_OPERATION_TIMEDOUT) {
48 return gen_framework_errno(error_class_network, network_errno_connect_timeout);
49 }
50
51 return FRAMEWORK_ERR(EIO);
52}
53
54Cicada::CURLConnection2::CURLConnection2(Cicada::IDataSource::SourceConfig *pConfig, CurlMulti *multi, CURLConnectionListener *listener)
55{

Callers 1

FillBufferMethod · 0.70

Calls 1

gen_framework_errnoFunction · 0.85

Tested by

no test coverage detected