diff options
Diffstat (limited to 'protocols/SkypeWeb/src/skype_login.cpp')
| -rw-r--r-- | protocols/SkypeWeb/src/skype_login.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/protocols/SkypeWeb/src/skype_login.cpp b/protocols/SkypeWeb/src/skype_login.cpp index bb920fb00e..47f9451b53 100644 --- a/protocols/SkypeWeb/src/skype_login.cpp +++ b/protocols/SkypeWeb/src/skype_login.cpp @@ -133,8 +133,11 @@ void CSkypeProto::OnEndpointCreated(NETLIBHTTPREQUEST *response, AsyncHttpReques case 301:
case 302: // redirect to the closest data center
- if (auto *hdr = Netlib_GetHeader(response, "Location"))
- g_plugin.szDefaultServer = GetServerFromUrl(hdr);
+ if (auto *hdr = Netlib_GetHeader(response, "Location")) {
+ CMStringA szUrl(hdr+8);
+ int iEnd = szUrl.Find('/');
+ g_plugin.szDefaultServer = (iEnd != -1) ? szUrl.Left(iEnd) : szUrl;
+ }
PushRequest(new CreateEndpointRequest(this));
return;
|
