diff options
author | George Hazan <george.hazan@gmail.com> | 2013-08-14 19:04:55 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-08-14 19:04:55 +0000 |
commit | b67c40f21c0fe0c80a3ddd31b0b09f71bf5d97d7 (patch) | |
tree | fa22404f4a40f81b86447c5bd7def26fd6815722 /protocols/MSN | |
parent | c95efb840d744ec332edfe311b69f1c7ac56560a (diff) |
mir_*printf patch for protocols
git-svn-id: http://svn.miranda-ng.org/main/trunk@5690 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN')
-rw-r--r-- | protocols/MSN/src/msn_mime.cpp | 2 | ||||
-rw-r--r-- | protocols/MSN/src/msn_misc.cpp | 4 | ||||
-rw-r--r-- | protocols/MSN/src/msn_p2p.cpp | 24 |
3 files changed, 15 insertions, 15 deletions
diff --git a/protocols/MSN/src/msn_mime.cpp b/protocols/MSN/src/msn_mime.cpp index e511d2017b..2549927254 100644 --- a/protocols/MSN/src/msn_mime.cpp +++ b/protocols/MSN/src/msn_mime.cpp @@ -170,7 +170,7 @@ char* MimeHeaders::writeToBuffer(char* dest) *dest = 0;
}
else
- dest += sprintf(dest, "%s: %s\r\n", H.name, H.value);
+ dest += sprintf(dest, "%s: %s\r\n", H.name, H.value); //!!!!!!!!!!!!
}
if (mCount)
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp index b765ff5e59..8f2f26401e 100644 --- a/protocols/MSN/src/msn_misc.cpp +++ b/protocols/MSN/src/msn_misc.cpp @@ -126,7 +126,7 @@ void CMsnProto::MSN_DebugLog(const char *fmt, ...) va_list vararg;
va_start(vararg, fmt);
- if (_vsnprintf(str, sizeof(str), fmt, vararg) != 0)
+ if (mir_vsnprintf(str, sizeof(str), fmt, vararg) != 0)
{
str[sizeof(str)-1] = 0;
CallService(MS_NETLIB_LOG, (WPARAM)hNetlibUser, (LPARAM)str);
@@ -714,7 +714,7 @@ int ThreadData::sendPacket(const char* cmd, const char* fmt,...) va_start(vararg, fmt);
int paramStart = mir_snprintf(str, strsize, "%s %d ", cmd, thisTrid);
- while (_vsnprintf(str+paramStart, strsize-paramStart-3, fmt, vararg) == -1)
+ while (mir_vsnprintf(str+paramStart, strsize-paramStart-3, fmt, vararg) == -1)
str = (char*)mir_realloc(str, strsize += 512);
str[strsize-3] = 0;
diff --git a/protocols/MSN/src/msn_p2p.cpp b/protocols/MSN/src/msn_p2p.cpp index a67a378f16..03f0b74a16 100644 --- a/protocols/MSN/src/msn_p2p.cpp +++ b/protocols/MSN/src/msn_p2p.cpp @@ -326,7 +326,7 @@ void CMsnProto::p2p_sendMsg(ThreadData* info, const char *wlid, unsigned appId, // add message header
p += msgType == 1 ? sizeof(unsigned) :
- sprintf(p, hdrdata.isV2Hdr() ? sttP2PheaderV2 : sttP2Pheader, wlid, MyOptions.szEmail, MyOptions.szMachineGuidP2P);
+ sprintf(p, hdrdata.isV2Hdr() ? sttP2PheaderV2 : sttP2Pheader, wlid, MyOptions.szEmail, MyOptions.szMachineGuidP2P); //!!!!!!!!!!!
if (hdrdata.isV2Hdr())
{
@@ -524,14 +524,14 @@ void CMsnProto::p2p_sendSlp(int iKind, filetransfer *ft, MimeHeaders &pHeaders, switch (iKind)
{
- case -3: p += sprintf(p, "ACK MSNMSGR:%s MSNSLP/1.0", wlid); break;
- case -2: p += sprintf(p, "INVITE MSNMSGR:%s MSNSLP/1.0", wlid); break;
- case -1: p += sprintf(p, "BYE MSNMSGR:%s MSNSLP/1.0", wlid); break;
- case 200: p += sprintf(p, "MSNSLP/1.0 200 OK"); break;
- case 481: p += sprintf(p, "MSNSLP/1.0 481 No Such Call"); break;
- case 500: p += sprintf(p, "MSNSLP/1.0 500 Internal Error"); break;
- case 603: p += sprintf(p, "MSNSLP/1.0 603 DECLINE"); break;
- case 1603: p += sprintf(p, "MSNSLP/1.0 603 Decline"); break;
+ case -3: p += sprintf(p, "ACK MSNMSGR:%s MSNSLP/1.0", wlid); break; //!!!!!!!!!!!!!!!!!!
+ case -2: p += sprintf(p, "INVITE MSNMSGR:%s MSNSLP/1.0", wlid); break; //!!!!!!!!!!!!!!!!!!
+ case -1: p += sprintf(p, "BYE MSNMSGR:%s MSNSLP/1.0", wlid); break; //!!!!!!!!!!!!!!!!!!
+ case 200: p += sprintf(p, "MSNSLP/1.0 200 OK"); break; //!!!!!!!!!!!!!!!!!!
+ case 481: p += sprintf(p, "MSNSLP/1.0 481 No Such Call"); break; //!!!!!!!!!!!!!!!!!!
+ case 500: p += sprintf(p, "MSNSLP/1.0 500 Internal Error"); break; //!!!!!!!!!!!!!!!!!!
+ case 603: p += sprintf(p, "MSNSLP/1.0 603 DECLINE"); break; //!!!!!!!!!!!!!!!!!!
+ case 1603: p += sprintf(p, "MSNSLP/1.0 603 Decline"); break; //!!!!!!!!!!!!!!!!!!
default: return;
}
@@ -547,7 +547,7 @@ void CMsnProto::p2p_sendSlp(int iKind, filetransfer *ft, MimeHeaders &pHeaders, "\r\nTo: <msnmsgr:%s>\r\n"
"From: <msnmsgr:%s;%s>\r\n"
"Via: MSNSLP/1.0/TLP ;branch=%s\r\n",
- wlid, MyOptions.szEmail, MyOptions.szMachineGuidP2P, ft->p2p_branch);
+ wlid, MyOptions.szEmail, MyOptions.szMachineGuidP2P, ft->p2p_branch); //!!!!!!!!!!!!!!!!!!
}
else
{
@@ -555,7 +555,7 @@ void CMsnProto::p2p_sendSlp(int iKind, filetransfer *ft, MimeHeaders &pHeaders, "\r\nTo: <msnmsgr:%s>\r\n"
"From: <msnmsgr:%s>\r\n"
"Via: MSNSLP/1.0/TLP ;branch=%s\r\n",
- wlid, MyOptions.szEmail, ft->p2p_branch);
+ wlid, MyOptions.szEmail, ft->p2p_branch); //!!!!!!!!!!!!!!!!!!
}
p = pHeaders.writeToBuffer(p);
@@ -901,7 +901,7 @@ LONG CMsnProto::p2p_sendPortion(filetransfer* ft, ThreadData* T, bool isV2) // Fill data size for direct transfer
if (T->mType != SERVER_P2P_DIRECT)
- p += sprintf(p, isV2 ? sttP2PheaderV2 : sttP2Pheader, ft->p2p_dest, MyOptions.szEmail, MyOptions.szMachineGuidP2P);
+ p += sprintf(p, isV2 ? sttP2PheaderV2 : sttP2Pheader, ft->p2p_dest, MyOptions.szEmail, MyOptions.szMachineGuidP2P); //!!!!!!!!!!!!!!!!!!
else
p += sizeof(unsigned);
|