Github user SolidWallOfCode commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/1007#discussion_r78416925
  
    --- Diff: proxy/InkAPI.cc ---
    @@ -9193,3 +9193,71 @@ TSHttpTxnIdGet(TSHttpTxn txnp)
     
       return (uint64_t)sm->sm_id;
     }
    +
    +// Return information about the protocols used by the client
    +TSReturnCode
    +TSHttpTxnClientProtocolStackGet(TSHttpTxn txnp, int n, char const 
**result, int *actual)
    +{
    +  sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS);
    +  sdk_assert(result != NULL);
    +  HttpSM *sm = (HttpSM *)txnp;
    +  int count  = 0;
    +  if (sm) {
    +    count = sm->populate_client_protocol(result, n);
    +  }
    +  if (actual) {
    +    *actual = count;
    --- End diff --
    
    My view, as I noted elsewhere in comments, is `result` can be `NULL` if `n` 
is `0`. Kind of a dumb thing to pass, but it could happen due to the caller 
making computations.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to