* Get OSP transaction ID from transaction handle * param transaction OSP transaction headle * return OSP transaction ID */
| 53 | * return OSP transaction ID |
| 54 | */ |
| 55 | unsigned 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 |
no outgoing calls
no test coverage detected