diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/proxy_ui_server.workspace | 1 | ||||
-rw-r--r-- | server/server/config.cpp | 13 |
2 files changed, 12 insertions, 2 deletions
diff --git a/server/proxy_ui_server.workspace b/server/proxy_ui_server.workspace index 075d714..30e9c53 100644 --- a/server/proxy_ui_server.workspace +++ b/server/proxy_ui_server.workspace @@ -12,6 +12,7 @@ <Environment> <![CDATA[ + ]]> </Environment> </CodeLite_Workspace> diff --git a/server/server/config.cpp b/server/server/config.cpp index 275f764..2f64d42 100644 --- a/server/server/config.cpp +++ b/server/server/config.cpp @@ -96,12 +96,21 @@ void config::load_upload_list(char *pth) if(file.is_open()) { char hash_buf[1024]; + int l = 0; while(!file.eof()) - MD5_Update(&c, hash_buf, file.readsome(hash_buf, 1024)); + { + file.read(hash_buf, 1024); + MD5_Update(&c, hash_buf, file.gcount()); + } file.close(); unsigned char result[MD5_DIGEST_LENGTH]; MD5_Final(result, &c); - hash = (char*)result; + char result_f; + for(int i = 0; i <MD5_DIGEST_LENGTH; i++) + { + sprintf(&result_f, "%02x",result[i]); + hash += result_f; + } } upload_list.push_back(upload_entry(source, destination, hash)); p2 = cfg_str.find(';', p1); |