Skip to content

Commit

Permalink
TS API: TSVConnSslSniGet sets 0 as length if it returns nullptr (#11773)
Browse files Browse the repository at this point in the history
  • Loading branch information
maskit authored Sep 18, 2024
1 parent d709763 commit a3c5cb5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/developer-guide/api/functions/TSVConnSslSniGet.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ Synopsis
Description
-----------
Get the SNI (Server Name Indication) that corresponds to SSL connection :arg:`sslp`.

If :arg:`length` is not null, the length of the returned string (or 0 if this function returns null) will be stored.
3 changes: 3 additions & 0 deletions src/api/InkAPI.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7929,6 +7929,9 @@ const char *
TSVConnSslSniGet(TSVConn sslp, int *length)
{
if (sslp == nullptr) {
if (length) {
*length = 0;
}
return nullptr;
}

Expand Down

0 comments on commit a3c5cb5

Please sign in to comment.