diff options
author | George Hazan <george.hazan@gmail.com> | 2013-06-02 18:35:56 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-06-02 18:35:56 +0000 |
commit | 11822f442f96b074e5e39bd4cc14d277205a9307 (patch) | |
tree | 8257ab929e3f2d5e626f693ca13c90b50aa196f0 /protocols/WhatsApp/src/proto.cpp | |
parent | 329ad84fa5b5a813b032f416e959eb2b0bb3582e (diff) |
first version of Wassup that compiles
git-svn-id: http://svn.miranda-ng.org/main/trunk@4863 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/proto.cpp')
-rw-r--r-- | protocols/WhatsApp/src/proto.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/protocols/WhatsApp/src/proto.cpp b/protocols/WhatsApp/src/proto.cpp index 99a903226f..e73e37ece0 100644 --- a/protocols/WhatsApp/src/proto.cpp +++ b/protocols/WhatsApp/src/proto.cpp @@ -169,7 +169,6 @@ HANDLE WhatsAppProto::SearchBasic( const PROTOCHAR* id ) void WhatsAppProto::RequestCode()
{
std::string cc, number, idx;
- bool error;
DBVARIANT dbv;
if ( WASocketConnection::hNetlibUser == NULL)
@@ -185,11 +184,10 @@ void WhatsAppProto::RequestCode() {
std::stringstream tm;
tm << time(NULL);
- unsigned char* idxBuf = new unsigned char[16];
- MD5((unsigned char*) tm.str().c_str(), tm.str().length(), idxBuf);
+ BYTE idxBuf[16];
+ utils::md5string(tm.str(), idxBuf);
idx = std::string((const char*) idxBuf, 16);
db_set_s(0, m_szModuleName,WHATSAPP_KEY_IDX, idx.c_str());
- delete idxBuf;
}
}
if ( !db_get_s(NULL,m_szModuleName,WHATSAPP_KEY_CC,&dbv, DBVT_ASCIIZ))
|