/[mldonkey]/mldonkey/src/daemon/driver/driverControlers.ml
ViewVC logotype

Diff of /mldonkey/src/daemon/driver/driverControlers.ml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.36 by spiralvoice, Mon Jul 18 00:52:31 2005 UTC revision 1.37 by spiralvoice, Fri Jul 22 14:32:12 2005 UTC
# Line 35  open TcpBufferedSocket Line 35  open TcpBufferedSocket
35  open DriverInteractive  open DriverInteractive
36  open CommonOptions  open CommonOptions
37    
38    (* prints a new logline with date, module and starts newline *)
39    let lprintf_nl () =
40      lprintf "%s[dCon] "
41        (log_time ()); lprintf_nl2
42    
43  let rec dollar_escape o with_frames s =  let rec dollar_escape o with_frames s =
44    String2.convert false (fun b escaped c ->    String2.convert false (fun b escaped c ->
# Line 332  let check_calendar () = Line 336  let check_calendar () =
336        if (List.mem tm.Unix.tm_wday days || days = [])  &&        if (List.mem tm.Unix.tm_wday days || days = [])  &&
337          (List.mem tm.Unix.tm_hour hours || hours = []) then begin          (List.mem tm.Unix.tm_hour hours || hours = []) then begin
338            eval (ref true) command calendar_options;            eval (ref true) command calendar_options;
339            lprintf "Calendar execute: %s\n%s\n" command            lprintf_nl () "Calendar execute: %s" command;
340              (Buffer.contents calendar_options.conn_buf);            lprintf_nl () "%s" (Buffer.contents calendar_options.conn_buf);
341            Buffer.clear calendar_options.conn_buf;            Buffer.clear calendar_options.conn_buf;
342          end          end
343    ) !!calendar    ) !!calendar
# Line 666  let chat_handler t event = Line 670  let chat_handler t event =
670             Unix.close s             Unix.close s
671       with       with
672         Failure mess ->         Failure mess ->
673           lprintf "%s\n" mess;           lprintf_nl () "%s" mess;
674           Unix.close s           Unix.close s
675      )      )
676    | _ ->    | _ ->
# Line 816  let http_send_bin r buf filename = Line 820  let http_send_bin r buf filename =
820    let ext_pos = (String.rindex filename '.') + 1 in    let ext_pos = (String.rindex filename '.') + 1 in
821    let exten = (String.sub filename ext_pos ((String.length filename) - ext_pos)) in    let exten = (String.sub filename ext_pos ((String.length filename) - ext_pos)) in
822    if !verbose_msg_servers then    if !verbose_msg_servers then
823      lprintf_nl "[HTTP]: Extension found [%s] for file: [%s]" exten filename;      lprintf_nl () "Extension found [%s] for file: [%s]" exten filename;
824    let ext = extension_to_file_ext exten in    let ext = extension_to_file_ext exten in
825    http_add_bin_header r ext clen;    http_add_bin_header r ext clen;
826    Buffer.add_string buf file_to_send    Buffer.add_string buf file_to_send
# Line 826  let http_error_no_gd img_type = Line 830  let http_error_no_gd img_type =
830      "jpg" ->      "jpg" ->
831        (match Autoconf.has_gd_jpg with        (match Autoconf.has_gd_jpg with
832          true -> false          true -> false
833        | false -> lprintf_nl "[HTTP] : Warning: GD jpg support disabled"; true)        | false -> lprintf_nl () "Warning: GD jpg support disabled"; true)
834    | "png" ->    | "png" ->
835        (match Autoconf.has_gd_png with        (match Autoconf.has_gd_png with
836          true -> false          true -> false
837        | false -> lprintf_nl "[HTTP] : Warning: GD png support disabled"; true)        | false -> lprintf_nl () "Warning: GD png support disabled"; true)
838    | _ ->    | _ ->
839        (match Autoconf.has_gd with        (match Autoconf.has_gd with
840          true -> false          true -> false
841        | false -> lprintf_nl "[HTTP] : Warning: GD support disabled"; true)        | false -> lprintf_nl () "Warning: GD support disabled"; true)
842  let any_ip = Ip.of_inet_addr Unix.inet_addr_any  let any_ip = Ip.of_inet_addr Unix.inet_addr_any
843    
844  let html_open_page buf t r open_body =  let html_open_page buf t r open_body =
# Line 1090  let http_handler o t r = Line 1094  let http_handler o t r =
1094    
1095          | "/favicon.ico" ->          | "/favicon.ico" ->
1096              if !verbose_msg_servers then              if !verbose_msg_servers then
1097                lprintf_nl "[BT]: favicon.ico request received by tracker";                lprintf_nl () "favicon.ico request received by tracker";
1098              http_send_bin r buf "favicon.ico"              http_send_bin r buf "favicon.ico"
1099    
1100          | "/filter" ->          | "/filter" ->
# Line 1273  let http_handler o t r = Line 1277  let http_handler o t r =
1277    
1278                | args ->                | args ->
1279                    List.iter (fun (s,v) ->                    List.iter (fun (s,v) ->
1280                        lprintf "[%s]=[%s]\n" (String.escaped s) (String.escaped v))                        lprintf_nl () "[%s]=[%s]" (String.escaped s) (String.escaped v))
1281                    args;                    args;
1282                    raise Not_found                    raise Not_found
1283              end              end
# Line 1336  let http_handler o t r = Line 1340  let http_handler o t r =
1340    
1341                | args ->                | args ->
1342                    List.iter (fun (s,v) ->                    List.iter (fun (s,v) ->
1343                        lprintf "[%s]=[%s]\n" (String.escaped s) (String.escaped v))                        lprintf_nl () "[%s]=[%s]" (String.escaped s) (String.escaped v))
1344                    args;                    args;
1345                    raise Not_found                    raise Not_found
1346              end              end

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26