From 11822f442f96b074e5e39bd4cc14d277205a9307 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 2 Jun 2013 18:35:56 +0000 Subject: first version of Wassup that compiles git-svn-id: http://svn.miranda-ng.org/main/trunk@4863 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/WhatsApp/src/proto.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'protocols/WhatsApp/src/proto.cpp') 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)) -- cgit v1.2.3