144 |
incoming.shdir_dirname incoming.shdir_priority |
incoming.shdir_dirname incoming.shdir_priority |
145 |
best_name new_name); |
best_name new_name); |
146 |
with e -> |
with e -> |
147 |
lprintf_nl "[cInt]Exception %s while trying to share commited file" |
lprintf_nl "[cInt] Exception %s while trying to share commited file" |
148 |
(Printexc2.to_string e); |
(Printexc2.to_string e); |
149 |
end; |
end; |
150 |
|
|
163 |
files =:= List2.removeq file !!files; |
files =:= List2.removeq file !!files; |
164 |
|
|
165 |
with e -> |
with e -> |
166 |
lprintf_nl "[cInt]Exception %s in file_commit secondaries" (Printexc2.to_string e); |
lprintf_nl "[cInt] Exception %s in file_commit secondaries" (Printexc2.to_string e); |
167 |
) secondary_files |
) secondary_files |
168 |
with e -> |
with e -> |
169 |
lprintf_nl "[cInt]Exception in file_commit: %s" (Printexc2.to_string e)) |
lprintf_nl "[cInt] Exception in file_commit: %s" (Printexc2.to_string e)) |
170 |
| _ -> assert false |
| _ -> assert false |
171 |
|
|
172 |
let file_cancel file = |
let file_cancel file = |
182 |
impl.impl_file_ops.op_file_cancel impl.impl_file_val; |
impl.impl_file_ops.op_file_cancel impl.impl_file_val; |
183 |
files =:= List2.removeq file !!files; |
files =:= List2.removeq file !!files; |
184 |
with e -> |
with e -> |
185 |
lprintf_nl "[cInt]Exception %s in file_cancel" (Printexc2.to_string e); |
lprintf_nl "[cInt] Exception %s in file_cancel" (Printexc2.to_string e); |
186 |
) subfiles; |
) subfiles; |
187 |
(try |
(try |
188 |
let fd = file_fd file in |
let fd = file_fd file in |
193 |
(Printexc2.to_string e); ); |
(Printexc2.to_string e); ); |
194 |
Unix32.destroy (file_fd file); |
Unix32.destroy (file_fd file); |
195 |
with e -> |
with e -> |
196 |
lprintf_nl "[cInt]Exception in file_cancel: %s" (Printexc2.to_string e) |
lprintf_nl "[cInt] Exception in file_cancel: %s" (Printexc2.to_string e) |
197 |
|
|
198 |
let time_to_string time = |
let time_to_string time = |
199 |
let days = time / 60 / 60 / 24 in |
let days = time / 60 / 60 / 24 in |
263 |
ignore (CommonShared.new_shared "completed" 0 ( |
ignore (CommonShared.new_shared "completed" 0 ( |
264 |
file_best_name file ) file_name); |
file_best_name file ) file_name); |
265 |
(try mail_for_completed_file file with e -> |
(try mail_for_completed_file file with e -> |
266 |
lprintf_nl "[cInt]Exception %s in sendmail" (Printexc2.to_string e); |
lprintf_nl "[cInt] Exception %s in sendmail" (Printexc2.to_string e); |
267 |
); |
); |
268 |
if !!CommonOptions.chat_warning_for_downloaded then |
if !!CommonOptions.chat_warning_for_downloaded then |
269 |
chat_for_completed_file file; |
chat_for_completed_file file; |
279 |
end |
end |
280 |
end |
end |
281 |
with e -> |
with e -> |
282 |
lprintf_nl "[cInt]Exception in file_completed: %s" (Printexc2.to_string e) |
lprintf_nl "[cInt] Exception in file_completed: %s" (Printexc2.to_string e) |
283 |
|
|
284 |
let file_add impl state = |
let file_add impl state = |
285 |
try |
try |
301 |
update_file_state impl state |
update_file_state impl state |
302 |
end |
end |
303 |
with e -> |
with e -> |
304 |
lprintf_nl "[cInt]Exception in file_add: %s" (Printexc2.to_string e) |
lprintf_nl "[cInt] Exception in file_add: %s" (Printexc2.to_string e) |
305 |
|
|
306 |
let server_remove server = |
let server_remove server = |
307 |
try |
try |
313 |
servers =:= Intmap.remove (server_num server) !!servers; |
servers =:= Intmap.remove (server_num server) !!servers; |
314 |
end |
end |
315 |
with e -> |
with e -> |
316 |
lprintf_nl "[cInt]Exception in server_remove: %s" (Printexc2.to_string e) |
lprintf_nl "[cInt] Exception in server_remove: %s" (Printexc2.to_string e) |
317 |
|
|
318 |
let server_add impl = |
let server_add impl = |
319 |
let server = as_server impl in |
let server = as_server impl in |
352 |
end |
end |
353 |
|
|
354 |
with e -> |
with e -> |
355 |
lprintf_nl "[cInt]Exception in friend_remove: %s" (Printexc2.to_string e) |
lprintf_nl "[cInt] Exception in friend_remove: %s" (Printexc2.to_string e) |
356 |
|
|
357 |
let contact_add c = |
let contact_add c = |
358 |
let impl = as_client_impl c in |
let impl = as_client_impl c in |
373 |
impl.impl_client_ops.op_client_clear_files impl.impl_client_val |
impl.impl_client_ops.op_client_clear_files impl.impl_client_val |
374 |
end |
end |
375 |
with e -> |
with e -> |
376 |
lprintf_nl "[cInt]Exception in contact_remove: %s" (Printexc2.to_string e) |
lprintf_nl "[cInt] Exception in contact_remove: %s" (Printexc2.to_string e) |
377 |
|
|
378 |
|
|
379 |
let time_of_sec sec = |
let time_of_sec sec = |