[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co...
From: |
mldonkey-commits |
Subject: |
[Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co... |
Date: |
Tue, 20 Jan 2009 16:47:29 +0000 |
CVSROOT: /sources/mldonkey
Module name: mldonkey
Changes by: spiralvoice <spiralvoice> 09/01/20 16:47:28
Modified files:
distrib : ChangeLog
src/daemon/common: commonOptions.ml commonTypes.ml
Log message:
patch #6727
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.1388&r2=1.1389
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonOptions.ml?cvsroot=mldonkey&r1=1.225&r2=1.226
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonTypes.ml?cvsroot=mldonkey&r1=1.76&r2=1.77
Patches:
Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.1388
retrieving revision 1.1389
diff -u -b -r1.1388 -r1.1389
--- distrib/ChangeLog 4 Jan 2009 14:46:46 -0000 1.1388
+++ distrib/ChangeLog 20 Jan 2009 16:47:28 -0000 1.1389
@@ -14,6 +14,10 @@
ChangeLog
=========
+2009/01/20
+6727: Web_infos: Replace old GeoIP URL with new one
+- old code added the new URL, even if GeoIP was not present in web_infos
+
2009/01/04
6714: BT: Fix bug when computing limits for max_bt_uploaders
6713: GeoIP: New web_infos URL for country list (thx to Choby)
Index: src/daemon/common/commonOptions.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonOptions.ml,v
retrieving revision 1.225
retrieving revision 1.226
diff -u -b -r1.225 -r1.226
--- src/daemon/common/commonOptions.ml 4 Jan 2009 14:46:46 -0000 1.225
+++ src/daemon/common/commonOptions.ml 20 Jan 2009 16:47:28 -0000 1.226
@@ -2093,6 +2093,11 @@
state = None;
}
+let web_infos_replace old_url new_url =
+ Hashtbl.iter (fun key w ->
+ if w.url = old_url then w.url <- new_url
+ ) web_infos_table
+
let _ =
(* convert list option web_infos to a hashtable for better usage *)
set_after_load_hook downloads_ini (fun _ ->
@@ -2220,8 +2225,9 @@
update 20
| 20 ->
- web_infos_remove
"http://www.maxmind.com/download/geoip/database/GeoIP.dat.gz";
- web_infos_add "geoip.dat" 0
"http://www.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz";
+ web_infos_replace
+ "http://www.maxmind.com/download/geoip/database/GeoIP.dat.gz"
+
"http://www.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz";
update 21
| _ -> ()
Index: src/daemon/common/commonTypes.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonTypes.ml,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -b -r1.76 -r1.77
--- src/daemon/common/commonTypes.ml 18 Mar 2008 08:24:37 -0000 1.76
+++ src/daemon/common/commonTypes.ml 20 Jan 2009 16:47:28 -0000 1.77
@@ -994,7 +994,7 @@
type web_infos = {
kind : string;
period : int;
- url : string;
+ mutable url : string;
mutable state : web_infos_state option;
}