diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2015-06-22 07:04:19 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2015-06-22 07:04:19 +0000 |
commit | 9aecf7128f09f8fdda28931ce44200a4b92b8e39 (patch) | |
tree | e4a17fe506d8a733186c0b8489e7592acffb8d57 /protocols/VKontakte/src/vk_files.cpp | |
parent | 5b530fc9d8dc47641985456908703eaa03b7c88d (diff) |
VKontakte:
rand/srand => Utils_GetRandom
minor code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@14319 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_files.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_files.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/VKontakte/src/vk_files.cpp b/protocols/VKontakte/src/vk_files.cpp index 180b8999e3..2331c389a1 100644 --- a/protocols/VKontakte/src/vk_files.cpp +++ b/protocols/VKontakte/src/vk_files.cpp @@ -201,8 +201,8 @@ void CVkProto::OnReciveUploadServer(NETLIBHTTPREQUEST *reply, AsyncHttpRequest * CMStringA FNamePart = fup->fileName();
// Boundary
- srand(time(NULL));
- int iboundary = rand();
+ int iboundary;
+ Utils_GetRandom(&iboundary, sizeof(iboundary));
boundary.AppendFormat("Miranda%dNG%d", iboundary, time(NULL));
// Header
header.AppendFormat("multipart/form-data; boundary=%s", boundary);
@@ -375,4 +375,4 @@ void CVkProto::OnReciveUploadFile(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pR pMsgReq->pUserInfo = new CVkSendMsgParam(fup->hContact, -1, (int)pReq->pUserInfo);
Push(pMsgReq);
-}
+}
\ No newline at end of file |