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

Function TSUrlPrint

src/api/InkAPI.cc:973–1006  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

971}
972
973void
974TSUrlPrint(TSMBuffer bufp, TSMLoc obj, TSIOBuffer iobufp)
975{
976 sdk_assert(sdk_sanity_check_mbuffer(bufp) == TS_SUCCESS);
977 sdk_assert(sdk_sanity_check_url_handle(obj) == TS_SUCCESS);
978 sdk_assert(sdk_sanity_check_iocore_structure(iobufp) == TS_SUCCESS);
979
980 MIOBuffer *b = reinterpret_cast<MIOBuffer *>(iobufp);
981 IOBufferBlock *blk;
982 int bufindex;
983 int tmp, dumpoffset;
984 int done;
985 URL u;
986
987 u.m_heap = (reinterpret_cast<HdrHeapSDKHandle *>(bufp))->m_heap;
988 u.m_url_impl = reinterpret_cast<URLImpl *>(obj);
989 dumpoffset = 0;
990
991 do {
992 blk = b->get_current_block();
993 if (!blk || blk->write_avail() == 0) {
994 b->add_block();
995 blk = b->get_current_block();
996 }
997
998 bufindex = 0;
999 tmp = dumpoffset;
1000
1001 done = u.print(blk->end(), blk->write_avail(), &bufindex, &tmp);
1002
1003 dumpoffset += bufindex;
1004 b->fill(bufindex);
1005 } while (!done);
1006}
1007
1008TSParseResult
1009TSUrlParse(TSMBuffer bufp, TSMLoc obj, const char **start, const char *end)

Callers 2

test_url_printFunction · 0.85
ts_util.ccFile · 0.85

Calls 9

sdk_sanity_check_mbufferFunction · 0.85
get_current_blockMethod · 0.80
write_availMethod · 0.45
add_blockMethod · 0.45
printMethod · 0.45
endMethod · 0.45
fillMethod · 0.45

Tested by 1

test_url_printFunction · 0.68