60 |
|
|
61 |
*) |
*) |
62 |
|
|
63 |
|
let lprintf_nl () = |
64 |
|
lprintf "%s[EDK]: " |
65 |
|
(log_time ()); lprintf_nl2 |
66 |
|
|
67 |
let create_online_sig () = |
let create_online_sig () = |
68 |
|
|
69 |
let most_users = ref Int64.zero in |
let most_users = ref Int64.zero in |
281 |
get_value "file_diskname" value_to_string |
get_value "file_diskname" value_to_string |
282 |
with _ -> |
with _ -> |
283 |
let filename = Filename.concat !!temp_directory file_md4 in |
let filename = Filename.concat !!temp_directory file_md4 in |
284 |
lprintf "geting file_diskname from ini failed, testing for ed2k-temp-file %s .\n" filename; |
lprintf_nl () "getting file_diskname from ini failed, testing for ed2k-temp-file %s" filename; |
285 |
if Sys.file_exists filename then |
if Sys.file_exists filename then |
286 |
filename |
filename |
287 |
else |
else |
291 |
!!temp_directory |
!!temp_directory |
292 |
( string_of_uid ( Ed2k (Md4.of_string file_md4) ) ) |
( string_of_uid ( Ed2k (Md4.of_string file_md4) ) ) |
293 |
in |
in |
294 |
lprintf "geting file_diskname from ini failed, testing for ed2k-temp-file %s .\n" |
lprintf_nl () "geting file_diskname from ini failed, testing for ed2k-temp-file %s" |
295 |
filename; |
filename; |
296 |
if Sys.file_exists filename then |
if Sys.file_exists filename then |
297 |
filename |
filename |
303 |
in |
in |
304 |
if not (Sys.file_exists filename) then |
if not (Sys.file_exists filename) then |
305 |
(* I think we should die here, to prevent any corruption. *) |
(* I think we should die here, to prevent any corruption. *) |
306 |
lprintf "ERROR ED2K-TEMP-FILE %s DOES NOT EXIST, THIS WILL PERHAPS LEAD TO CORRUPTION IN THAT DOWNLOAD!!!!!!!!!!!!!!!\n" |
lprintf_nl () "ERROR ED2K-TEMP-FILE %s DOES NOT EXIST, THIS WILL PERHAPS LEAD TO CORRUPTION IN THAT DOWNLOAD!" |
307 |
filename; |
filename; |
308 |
if !verbose then lprintf "ed2k-temp-file %s used.\n" filename; |
if !verbose then lprintf_nl () "ed2k-temp-file %s used." filename; |
309 |
filename |
filename |
310 |
in |
in |
311 |
|
|
633 |
let config_files_loaded = ref false |
let config_files_loaded = ref false |
634 |
|
|
635 |
let load _ = |
let load _ = |
636 |
if !verbose then lprintf "EDK: Loading shared files\n"; |
if !verbose then lprintf_nl () "Loading shared files"; |
637 |
(try |
(try |
638 |
Options.load shared_files_ini; |
Options.load shared_files_ini; |
639 |
Options.load stats_ini; |
Options.load stats_ini; |