diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2011-12-02 03:06:24 +0200 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2011-12-02 03:06:24 +0200 |
commit | 8d6422572c9e531116eb7aea103a93f62f8ae3e2 (patch) | |
tree | abe8d00167d791f0c0876ab352e60810501a205f | |
parent | 387e3a01f1c1352f540581aa6d5a0b31b08ca6fc (diff) |
fixed md5 calculation
-rw-r--r-- | server/proxy_ui_server.workspace | 1 | ||||
-rw-r--r-- | server/server/config.cpp | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/server/proxy_ui_server.workspace b/server/proxy_ui_server.workspace index fef20c5..64fb4f6 100644 --- a/server/proxy_ui_server.workspace +++ b/server/proxy_ui_server.workspace @@ -20,6 +20,7 @@ + ]]> </Environment> </CodeLite_Workspace> diff --git a/server/server/config.cpp b/server/server/config.cpp index 2b28ed0..9f2e688 100644 --- a/server/server/config.cpp +++ b/server/server/config.cpp @@ -167,11 +167,11 @@ void config::load_upload_list(char *pth) file.close(); unsigned char result[MD5_DIGEST_LENGTH]; MD5_Final(result, &c); - char result_f; + char result_f[2]; for(int i = 0; i <MD5_DIGEST_LENGTH; i++) { - sprintf(&result_f, "%02x",result[i]); - hash += result_f; + sprintf(result_f, "%02x",result[i]); + hash.append(result_f); } } upload_list.push_back(upload_entry(source, destination, hash)); |