Commit f494bdad authored by Nicolas Jager's avatar Nicolas Jager

contact ring id : fix bad formatting

- trimms the the string "from" received by the daemon's
IncomingCall signal

Change-Id: I0dd6afcfcd43847afbda640b387465d12a9930d8
parent 25608ed8
...@@ -194,6 +194,9 @@ RingClientUWP::RingD::startDaemon() ...@@ -194,6 +194,9 @@ RingClientUWP::RingD::startDaemon()
auto callId2 = toPlatformString(callId); auto callId2 = toPlatformString(callId);
auto from2 = toPlatformString(from); auto from2 = toPlatformString(from);
/* fix some issue in the daemon --> <...@...> */
from2 = Utils::TrimRingId(from2);
CoreApplication::MainView->CoreWindow->Dispatcher->RunAsync( CoreApplication::MainView->CoreWindow->Dispatcher->RunAsync(
CoreDispatcherPriority::Normal, ref new DispatchedHandler([=]() CoreDispatcherPriority::Normal, ref new DispatchedHandler([=]()
{ {
......
...@@ -106,6 +106,24 @@ Platform::String^ Trim(Platform::String^ s) ...@@ -106,6 +106,24 @@ Platform::String^ Trim(Platform::String^ s)
return ref new Platform::String(first, static_cast<unsigned int>(last - first)); 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() Platform::String^ GetNewGUID()
{ {
GUID result; GUID result;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment