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

Function TSMimeHdrCreate

src/api/InkAPI.cc:1423–1438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1421// TSMLoc: pointers to MIMEFieldSDKHandle objects
1422
1423TSReturnCode
1424TSMimeHdrCreate(TSMBuffer bufp, TSMLoc *locp)
1425{
1426 // Allow to modify the buffer only
1427 // if bufp is modifiable. If bufp is not modifiable return
1428 // TS_ERROR. If not allowed, set *locp to TS_NULL_MLOC.
1429 sdk_assert(sdk_sanity_check_mbuffer(bufp) == TS_SUCCESS);
1430 sdk_assert(sdk_sanity_check_null_ptr((void *)locp) == TS_SUCCESS);
1431
1432 if (!isWriteable(bufp)) {
1433 return TS_ERROR;
1434 }
1435
1436 *locp = reinterpret_cast<TSMLoc>(mime_hdr_create((reinterpret_cast<HdrHeapSDKHandle *>(bufp))->m_heap));
1437 return TS_SUCCESS;
1438}
1439
1440TSReturnCode
1441TSMimeHdrDestroy(TSMBuffer bufp, TSMLoc obj)

Callers 4

TSPluginInitFunction · 0.85
TSPluginInitFunction · 0.85

Calls 4

sdk_sanity_check_mbufferFunction · 0.85
isWriteableFunction · 0.85
mime_hdr_createFunction · 0.85