From 5cf5ee20485d79c40340026bb92f4dcfed1902e9 Mon Sep 17 00:00:00 2001 From: hai007 Date: Wed, 1 Jun 2022 08:24:09 -0700 Subject: [PATCH] Change DisconnectFromEndpoint to accept const char * instead of char *. PiperOrigin-RevId: 452301890 --- connections/clients/windows/core_adapter.cc | 2 +- connections/clients/windows/core_adapter.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/connections/clients/windows/core_adapter.cc b/connections/clients/windows/core_adapter.cc index 1d70c0ad..6338cc7a 100644 --- a/connections/clients/windows/core_adapter.cc +++ b/connections/clients/windows/core_adapter.cc @@ -244,7 +244,7 @@ void CancelPayload(connections::Core *pCore, std::int64_t payload_id, pCore->CancelPayload(payload_id, *callback.GetImpl()); } -void DisconnectFromEndpoint(connections::Core *pCore, char *endpoint_id, +void DisconnectFromEndpoint(connections::Core *pCore, const char *endpoint_id, ResultCallbackW callback) { if (pCore == nullptr) { return; diff --git a/connections/clients/windows/core_adapter.h b/connections/clients/windows/core_adapter.h index e22fd972..78151261 100644 --- a/connections/clients/windows/core_adapter.h +++ b/connections/clients/windows/core_adapter.h @@ -220,7 +220,8 @@ DLL_API void __stdcall CancelPayload(Core*, int64_t, ResultCallbackW); // result_cb - to access the status of the operation when available. // Possible status codes include: // Status::STATUS_OK - finished successfully. -DLL_API void __stdcall DisconnectFromEndpoint(Core*, char*, ResultCallbackW); +DLL_API void __stdcall DisconnectFromEndpoint(Core*, const char*, + ResultCallbackW); // Disconnects from, and removes all traces of, all connected and/or // discovered endpoints. This call is expected to be preceded by a call to