MCPcopy Create free account
hub / github.com/apache/trafficserver / TSUrlFtpTypeSet

Function TSUrlFtpTypeSet

src/api/InkAPI.cc:1239–1257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1237}
1238
1239TSReturnCode
1240TSUrlFtpTypeSet(TSMBuffer bufp, TSMLoc obj, int type)
1241{
1242 // The valid values are : 0, 65('A'), 97('a'),
1243 // 69('E'), 101('e'), 73 ('I') and 105('i').
1244 sdk_assert(sdk_sanity_check_mbuffer(bufp) == TS_SUCCESS);
1245 sdk_assert(sdk_sanity_check_url_handle(obj) == TS_SUCCESS);
1246
1247 if ((type == 0 || type == 'A' || type == 'E' || type == 'I' || type == 'a' || type == 'i' || type == 'e') && isWriteable(bufp)) {
1248 URL u;
1249
1250 u.m_heap = (reinterpret_cast<HdrHeapSDKHandle *>(bufp))->m_heap;
1251 u.m_url_impl = reinterpret_cast<URLImpl *>(obj);
1252 u.type_code_set(type);
1253 return TS_SUCCESS;
1254 }
1255
1256 return TS_ERROR;
1257}
1258
1259/* HTTP specific URLs */
1260

Callers 1

Calls 4

sdk_sanity_check_mbufferFunction · 0.85
isWriteableFunction · 0.85
type_code_setMethod · 0.80

Tested by 1