diff options
Diffstat (limited to 'protocols/SkypeWeb/src')
-rw-r--r-- | protocols/SkypeWeb/src/skype_network.cpp | 29 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_proto.cpp | 7 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_proto.h | 2 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_utils.cpp | 2 |
4 files changed, 8 insertions, 32 deletions
diff --git a/protocols/SkypeWeb/src/skype_network.cpp b/protocols/SkypeWeb/src/skype_network.cpp deleted file mode 100644 index a982b70346..0000000000 --- a/protocols/SkypeWeb/src/skype_network.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/*
-Copyright (c) 2015-20 Miranda NG team (https://miranda-ng.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation version 2
-of the License.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "stdafx.h"
-
-void CSkypeProto::InitNetwork()
-{
- CMStringW name(FORMAT, TranslateT("%s connection"), m_tszUserName);
-
- NETLIBUSER nlu = {};
- nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_UNICODE;
- nlu.szDescriptiveName.w = name.GetBuffer();
- nlu.szSettingsModule = m_szModuleName;
- m_hNetlibUser = Netlib_RegisterUser(&nlu);
-}
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp index 4536dc4b8f..eddaa3d9a3 100644 --- a/protocols/SkypeWeb/src/skype_proto.cpp +++ b/protocols/SkypeWeb/src/skype_proto.cpp @@ -28,7 +28,12 @@ CSkypeProto::CSkypeProto(const char* protoName, const wchar_t* userName) : m_impl(*this), m_requests(1) { - InitNetwork(); + NETLIBUSER nlu = {}; + CMStringW name(FORMAT, TranslateT("%s connection"), m_tszUserName); + nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_UNICODE; + nlu.szDescriptiveName.w = name.GetBuffer(); + nlu.szSettingsModule = m_szModuleName; + m_hNetlibUser = Netlib_RegisterUser(&nlu); CreateProtoService(PS_CREATEACCMGRUI, &CSkypeProto::OnAccountManagerInit); CreateProtoService(PS_GETAVATARINFO, &CSkypeProto::SvcGetAvatarInfo); diff --git a/protocols/SkypeWeb/src/skype_proto.h b/protocols/SkypeWeb/src/skype_proto.h index 52a8e04cc9..2760c47f39 100644 --- a/protocols/SkypeWeb/src/skype_proto.h +++ b/protocols/SkypeWeb/src/skype_proto.h @@ -183,8 +183,6 @@ private: INT_PTR __cdecl SvcSetMyAvatar(WPARAM, LPARAM);
// requests
- void InitNetwork();
-
bool m_isTerminated = true;
mir_cs m_requestQueueLock;
LIST<AsyncHttpRequest> m_requests;
diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp index c0ab50c155..41815c55ec 100644 --- a/protocols/SkypeWeb/src/skype_utils.cpp +++ b/protocols/SkypeWeb/src/skype_utils.cpp @@ -616,6 +616,8 @@ AsyncHttpRequest::AsyncHttpRequest(int type, SkypeHost host, LPCSTR url, MTHttpR break; } + AddHeader("User-Agent", NETLIB_USER_AGENT); + if (url) m_szUrl.Append(url); m_pFunc = pFunc; |