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

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

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

revision 1.27 by spiralvoice, Fri May 13 21:15:47 2005 UTC revision 1.28 by spiralvoice, Tue Jul 5 12:27:41 2005 UTC
# Line 1112  let gui_handler t event = Line 1112  let gui_handler t event =
1112    match event with    match event with
1113      TcpServerSocket.CONNECTION (s, Unix.ADDR_INET (from_ip, from_port)) ->      TcpServerSocket.CONNECTION (s, Unix.ADDR_INET (from_ip, from_port)) ->
1114        let from_ip = Ip.of_inet_addr from_ip in        let from_ip = Ip.of_inet_addr from_ip in
1115        lprintf "CONNECTION FROM GUI\n";        lprintf "GUI: Connection from %s\n" (Ip.to_string from_ip);
1116        if Ip.matches from_ip !!allowed_ips then        if Ip.matches from_ip !!allowed_ips then
1117                    
1118          let module P = GuiProto in          let module P = GuiProto in
# Line 1141  let gui_handler t event = Line 1141  let gui_handler t event =
1141          (* sort GUIs in increasing order of their num *)          (* sort GUIs in increasing order of their num *)
1142                    
1143        else begin        else begin
1144            lprintf "Connection from that IP %s not allowed\n"            lprintf "Connection from IP %s not allowed\n"
1145              (Ip.to_string from_ip);              (Ip.to_string from_ip);
1146            Unix.close s            Unix.close s
1147          end          end
# Line 1151  let gift_handler t event = Line 1151  let gift_handler t event =
1151    match event with    match event with
1152      TcpServerSocket.CONNECTION (s, Unix.ADDR_INET (from_ip, from_port)) ->      TcpServerSocket.CONNECTION (s, Unix.ADDR_INET (from_ip, from_port)) ->
1153        let from_ip = Ip.of_inet_addr from_ip in        let from_ip = Ip.of_inet_addr from_ip in
1154        lprintf "CONNECTION FROM GUI\n";        lprintf "Gift: Connection from %s\n" (Ip.to_string from_ip);
1155        if Ip.matches from_ip !!allowed_ips then        if Ip.matches from_ip !!allowed_ips then
1156                    
1157          let module P = GuiProto in          let module P = GuiProto in
# Line 1179  let gift_handler t event = Line 1179  let gift_handler t event =
1179          (* sort GUIs in increasing order of their num *)          (* sort GUIs in increasing order of their num *)
1180                    
1181        else begin        else begin
1182            lprintf "Connection from that IP %s not allowed\n"            lprintf "Connection from IP %s not allowed\n"
1183              (Ip.to_string from_ip);              (Ip.to_string from_ip);
1184            Unix.close s            Unix.close s
1185          end          end

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

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