diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2013-08-13 16:18:58 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-08-13 16:18:58 +0000 |
commit | 8d6fe5753b2e570c064c9e0d438cf019a2d3e3d3 (patch) | |
tree | 0b0746bb0a81636cd3abe9b85c9070828b722e1d /protocols | |
parent | 3fe0fd0f99ff17216b9cb8b479c5c8c77d4e1c3c (diff) |
fixed port saving when registering new jid
git-svn-id: http://svn.miranda-ng.org/main/trunk@5669 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/JabberG/src/jabber_captcha.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_opt.cpp | 4 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_proto.h | 1 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_thread.cpp | 7 |
4 files changed, 8 insertions, 6 deletions
diff --git a/protocols/JabberG/src/jabber_captcha.cpp b/protocols/JabberG/src/jabber_captcha.cpp index 3034e777ad..687b8487dd 100644 --- a/protocols/JabberG/src/jabber_captcha.cpp +++ b/protocols/JabberG/src/jabber_captcha.cpp @@ -161,7 +161,7 @@ bool CJabberProto::ProcessCaptcha(HXML node, HXML parentNode, ThreadData* info) if (lstrcmp(param.Result, _T("")) == 0 || !res)
sendCaptchaError(info, param.from, param.to, param.challenge);
else
- sendCaptchaResult (param.Result, info, param.from, param.challenge, param.fromjid, param.sid);
+ sendCaptchaResult(param.Result, info, param.from, param.challenge, param.fromjid, param.sid);
return true;
}
diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp index 0ccb2f8207..44f6c1c13b 100644 --- a/protocols/JabberG/src/jabber_opt.cpp +++ b/protocols/JabberG/src/jabber_opt.cpp @@ -289,7 +289,7 @@ private: strncpy(thread->manualHost, m_regInfo->manualHost, SIZEOF(thread->manualHost));
thread->port = m_regInfo->port;
thread->useSSL = m_regInfo->useSSL;
- thread->reg_hwndDlg= m_hwnd;
+ thread->reg_hwndDlg = m_hwnd;
m_proto->ForkThread((CJabberProto::MyThreadFunc)&CJabberProto::ServerThread, thread);
m_btnOk.SetText(TranslateT("Cancel"));
@@ -589,6 +589,7 @@ private: if (m_chkManualHost.GetState() == BST_CHECKED) {
regInfo.port = (WORD)m_txtManualPort.GetInt();
m_txtManualHost.GetTextA(regInfo.manualHost, SIZEOF(regInfo.manualHost));
+ regInfo.proto->m_options.ManualConnect = TRUE;
}
else {
regInfo.port = (WORD)m_txtPort.GetInt();
@@ -1914,6 +1915,7 @@ private: if (m_chkManualHost.GetState() == BST_CHECKED)
{
m_txtManualHost.GetTextA(regInfo.manualHost, SIZEOF(regInfo.manualHost));
+ regInfo.proto->m_options.ManualConnect = TRUE;
} else
{
regInfo.manualHost[0] = '\0';
diff --git a/protocols/JabberG/src/jabber_proto.h b/protocols/JabberG/src/jabber_proto.h index 7e0f47124a..829f096b97 100644 --- a/protocols/JabberG/src/jabber_proto.h +++ b/protocols/JabberG/src/jabber_proto.h @@ -437,7 +437,6 @@ struct CJabberProto : public PROTO<CJabberProto> //---- jabber_captcha.cpp ------------------------------------------------------------
- bool GetCaptchaImage(HXML node, TCHAR*& CaptchaPath);
void sendCaptchaResult(TCHAR* buf, ThreadData* info, LPCTSTR from, LPCTSTR challenge, LPCTSTR fromjid, LPCTSTR sid);
void sendCaptchaError(ThreadData* info, LPCTSTR from, LPCTSTR to, LPCTSTR challenge);
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index e7047594cc..4fa1415eff 100644 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -258,13 +258,14 @@ void CJabberProto::ServerThread(ThreadData* info) info->resolveID = -1;
info->auth = NULL;
- if (m_options.ManualConnect == TRUE) {
+ if (info->proto->m_options.ManualConnect == TRUE) {
if ( !getString("ManualHost", &dbv)) {
strncpy(info->manualHost, dbv.pszVal, SIZEOF(info->manualHost));
info->manualHost[SIZEOF(info->manualHost)-1] = '\0';
db_free(&dbv);
}
- info->port = getWord("ManualPort", JABBER_DEFAULT_PORT);
+ if (getWord("ManualPort", JABBER_DEFAULT_PORT) != JABBER_DEFAULT_PORT)
+ info->port = getWord("ManualPort", JABBER_DEFAULT_PORT);
}
else info->port = getWord("Port", JABBER_DEFAULT_PORT);
@@ -2100,7 +2101,7 @@ int ThreadData::send(const char* fmt, ...) va_start(vararg, fmt);
int size = 512;
char* str = (char*)mir_alloc(size);
- while (_vsnprintf(str, size, fmt, vararg) == -1) {
+ while (mir_vsnprintf(str, size, fmt, vararg) == -1) {
size += 512;
str = (char*)mir_realloc(str, size);
}
|