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/JabberG/src/jabber_thread.cpp | |
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/JabberG/src/jabber_thread.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_thread.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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);
}
|