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

Function TSClientRequestUuidGet

src/api/InkAPI.cc:8613–8628  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8611}
8612
8613TSReturnCode
8614TSClientRequestUuidGet(TSHttpTxn txnp, char *uuid_str)
8615{
8616 sdk_assert(sdk_sanity_check_null_ptr((void *)uuid_str) == TS_SUCCESS);
8617
8618 HttpSM *sm = reinterpret_cast<HttpSM *>(txnp);
8619 const char *machine = const_cast<char *>(Machine::instance()->uuid.getString());
8620 int len;
8621
8622 len = snprintf(uuid_str, TS_CRUUID_STRING_LEN + 1, "%s-%" PRId64 "", machine, sm->sm_id);
8623 if (len > TS_CRUUID_STRING_LEN) {
8624 return TS_ERROR;
8625 }
8626
8627 return TS_SUCCESS;
8628}
8629
8630TSReturnCode
8631TSUuidStringParse(TSUuid uuid, const char *str)

Callers 3

_getMethod · 0.85
append_valueMethod · 0.85

Calls 2

getStringMethod · 0.45

Tested by

no test coverage detected