MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / ospGetTransactionId

Function ospGetTransactionId

modules/osp/osptoolkit.c:55–73  ·  view source on GitHub ↗

* Get OSP transaction ID from transaction handle * param transaction OSP transaction headle * return OSP transaction ID */

Source from the content-addressed store, hash-verified

53 * return OSP transaction ID
54 */
55unsigned long long ospGetTransactionId(
56 OSPTTRANHANDLE transaction)
57{
58 OSPTTRANS* context = NULL;
59 unsigned long long id = 0;
60 int errorcode = OSPC_ERR_NO_ERROR;
61
62 context = OSPPTransactionGetContext(transaction, &errorcode);
63
64 if (errorcode == OSPC_ERR_NO_ERROR) {
65 id = (unsigned long long)context->TransactionID;
66 } else {
67 LM_ERR("failed to extract transaction_id from transaction handle %d (%d)\n",
68 transaction,
69 errorcode);
70 }
71
72 return id;
73}
74
75/*
76 * Create a thread to report OSP usage

Callers 4

ospReportUsageWrapperFunction · 0.85
ospReportUsageWorkFunction · 0.85
ospValidateHeaderFunction · 0.85
ospLoadRoutesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected