summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_thread.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-09-10 09:51:26 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-09-10 09:51:26 +0000
commit978f1a8b1ab79642c7ff4301ca00aff6eb4a2890 (patch)
tree398df9a4376f37edd22b652426a468d50ba7f8c5 /protocols/JabberG/src/jabber_thread.cpp
parent2e7712a526556ead476ead3083039417f7eba863 (diff)
obsolete function ThreadData::send(...) removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@6040 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_thread.cpp')
-rw-r--r--protocols/JabberG/src/jabber_thread.cpp33
1 files changed, 7 insertions, 26 deletions
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp
index 859f6d2c57..0ded9a90c9 100644
--- a/protocols/JabberG/src/jabber_thread.cpp
+++ b/protocols/JabberG/src/jabber_thread.cpp
@@ -2040,10 +2040,12 @@ int ThreadData::send(char* buffer, int bufsize)
if (this == NULL)
return 0;
- int result;
+ if (bufsize == -1)
+ bufsize = strlen(buffer);
WaitForSingleObject(iomutex, 6000);
+ int result;
if (useZlib)
result = zlibSend(buffer, bufsize);
else
@@ -2073,7 +2075,7 @@ int ThreadData::send(HXML node)
TCHAR *q = str;
for (TCHAR *p = str; *p; ++p) {
- WCHAR c = *p;
+ WCHAR c = *p;
if (c < 0x9 || c > 0x9 && c < 0xA || c > 0xA && c < 0xD || c > 0xD && c < 0x20 || c > 0xD7FF && c < 0xE000 || c > 0xFFFD)
continue;
@@ -2083,31 +2085,10 @@ int ThreadData::send(HXML node)
*q = 0;
- char* utfStr = mir_utf8encodeT(str);
- int result = send(utfStr, (int)strlen(utfStr));
- mir_free(utfStr);
+ char* utfStr = mir_utf8encodeT(str);
+ int result = send(utfStr, (int)strlen(utfStr));
+ mir_free(utfStr);
xi.freeMem(str);
return result;
}
-
-int ThreadData::send(const char* fmt, ...)
-{
- if (this == NULL)
- return 0;
-
- va_list vararg;
- va_start(vararg, fmt);
- int size = 512;
- char* str = (char*)mir_alloc(size);
- while (mir_vsnprintf(str, size, fmt, vararg) == -1) {
- size += 512;
- str = (char*)mir_realloc(str, size);
- }
- va_end(vararg);
-
- int result = send(str, (int)strlen(str));
-
- mir_free(str);
- return result;
-}