diff --git a/RingD.cpp b/RingD.cpp index d2a2929e1d528c00a445233544be82d13d399c69..ccd7f0047d3731415ec087df0d678b728c27380a 100644 --- a/RingD.cpp +++ b/RingD.cpp @@ -194,6 +194,9 @@ RingClientUWP::RingD::startDaemon() auto callId2 = toPlatformString(callId); auto from2 = toPlatformString(from); + /* fix some issue in the daemon --> <...@...> */ + from2 = Utils::TrimRingId(from2); + CoreApplication::MainView->CoreWindow->Dispatcher->RunAsync( CoreDispatcherPriority::Normal, ref new DispatchedHandler([=]() { diff --git a/Utils.h b/Utils.h index 9eb3f0be5ce16e33400c213df8b96b0d80e8e3de..0a6188955be7d460404b4dd16802095d600a0748 100644 --- a/Utils.h +++ b/Utils.h @@ -106,6 +106,24 @@ Platform::String^ Trim(Platform::String^ s) return ref new Platform::String(first, static_cast<unsigned int>(last - first)); } +/* fix some issue in the daemon --> <...@...> */ +Platform::String^ TrimRingId(Platform::String^ s) +{ + const WCHAR* first = s->Begin(); + const WCHAR* last = s->End(); + + while (first != last && *first != '<') + ++first; + + while (first != last && last[-1] != '@') + --last; + + first++; + last--; + + return ref new Platform::String(first, static_cast<unsigned int>(last - first)); +} + Platform::String^ GetNewGUID() { GUID result;