Skip to content

Commit

Permalink
HPCC-31196 Revise based on review
Browse files Browse the repository at this point in the history
1. Inside the DisconnectClientConnectionRequest, rename the URL
to Endpoint.
2. Update the usage text for dalidiag -unlock.

Signed-off-by: wangkx <kevin.wang@lexisnexis.com>
  • Loading branch information
wangkx committed Mar 4, 2024
1 parent 5853ecc commit 61b9603
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dali/dalidiag/dalidiag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void usage(const char *exe)
printf("-disconnect <ip>:<port> -- forcably disconnect a clients connection\n");
printf("-permissions <logicalname> <user> <password> -- get file permissions\n");
printf("-unlock <connection_id> [close] -- forcibly disconnect an sds lock\n");
printf(" (use id's given by '-locks'\n");
printf(" (use the ConnectionId in hex given by '-locks'\n");
printf("-settracetransactions -- trace dali transactions\n");
printf("-settraceslowtransactions <millisecond-threshold> -- trace slow dali transactions\n");
printf("-cleartracetransactions -- stop tracing dali transactions\n");
Expand Down
2 changes: 1 addition & 1 deletion esp/scm/ws_dali.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ ESPrequest [nil_remove] GetSDSSubscribersRequest

ESPrequest [nil_remove] DisconnectClientConnectionRequest
{
string URL;
string Endpoint;
};

ESPrequest [nil_remove] UnlockSDSLockRequest
Expand Down
10 changes: 5 additions & 5 deletions esp/services/ws_dali/ws_daliservice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -601,15 +601,15 @@ bool CWSDaliEx::onDisconnectClientConnection(IEspContext& context, IEspDisconnec
{
checkAccess(context);

const char* url = req.getURL();
if (isEmptyString(url))
throw makeStringException(ECLWATCH_INVALID_INPUT, "URL not specified.");
const char* ep = req.getEndpoint();
if (isEmptyString(ep))
throw makeStringException(ECLWATCH_INVALID_INPUT, "Endpoint not specified.");

MemoryBuffer mb;
mb.append("disconnect").append(url);
mb.append("disconnect").append(ep);
getDaliDiagnosticValue(mb);

VStringBuffer result("DisconnectClientConnection called for %s.", url);
VStringBuffer result("DisconnectClientConnection called for %s.", ep);
resp.setResult(result);
}
catch(IException* e)
Expand Down

0 comments on commit 61b9603

Please sign in to comment.