Attachment "564670.diff" to
ticket [564670ffff]
added by
andreas_kupries
2002-06-08 00:11:34.
? modules/fileinput
? modules/ftp/example
? modules/ftpd/examples
Index: ChangeLog
===================================================================
RCS file: /cvsroot/tcllib/tcllib/ChangeLog,v
retrieving revision 1.153
diff -u -r1.153 ChangeLog
--- ChangeLog 5 Jun 2002 22:59:06 -0000 1.153
+++ ChangeLog 7 Jun 2002 17:09:56 -0000
@@ -1,3 +1,7 @@
+2002-06-07 Andreas Kupries <[email protected]>
+
+ * dns: Fixed SF bug #564670.
+
2002-06-05 Andreas Kupries <[email protected]>
* all.tcl: Updated to use a default value for -modules if that
Index: modules/dns/ChangeLog
===================================================================
RCS file: /cvsroot/tcllib/tcllib/modules/dns/ChangeLog,v
retrieving revision 1.1
diff -u -r1.1 ChangeLog
--- modules/dns/ChangeLog 5 Jun 2002 22:59:07 -0000 1.1
+++ modules/dns/ChangeLog 7 Jun 2002 17:09:56 -0000
@@ -1,3 +1,10 @@
+2002-06-07 Andreas Kupries <[email protected]>
+
+ * dns.tcl: moved var initialization code to the end, as it uses
+ the 'dns::configure' command, and thus should be called after
+ its definition. This is the reason for bug #564670, thus now
+ fixed.
+
2002-06-05 Andreas Kupries <[email protected]>
* dns.man: Added note to manpage regarding DNS via TCP and
Index: modules/dns/dns.tcl
===================================================================
RCS file: /cvsroot/tcllib/tcllib/modules/dns/dns.tcl,v
retrieving revision 1.1
diff -u -r1.1 dns.tcl
--- modules/dns/dns.tcl 2 Mar 2002 01:37:46 -0000 1.1
+++ modules/dns/dns.tcl 7 Jun 2002 17:09:57 -0000
@@ -32,34 +32,6 @@
namespace export configure resolve name address cname \
status reset wait cleanup
-
- variable options
- if {![info exists options]} {
- array set options {
- port 53
- timeout 30000
- protocol tcp
- search {}
- nameserver {localhost}
- loglevel warning
- }
- configure -loglevel $options(loglevel)
- }
-
- variable types
- array set types {
- A 1 NS 2 MD 3 MF 4 CNAME 5 SOA 6 MB 7 MG 8 MR 9
- NULL 10 WKS 11 PTR 12 HINFO 13 MINFO 14 MX 15 TXT 16
- AXFR 252 MAILB 253 MAILA 254 * 255
- }
-
- variable classes
- array set classes { IN 1 CS 2 CH 3 HS 4 * 255}
-
- variable uid
- if {![info exists uid]} {
- set uid 0
- }
}
# -------------------------------------------------------------------------
@@ -852,6 +824,39 @@
set query "//${ns}/${query}"
}
return "dns:$query"
+}
+
+# -------------------------------------------------------------------------
+# Initialize variables, using the procedures defined above.
+
+namespace eval dns {
+ variable options
+ if {![info exists options]} {
+ array set options {
+ port 53
+ timeout 30000
+ protocol tcp
+ search {}
+ nameserver {localhost}
+ loglevel warning
+ }
+ configure -loglevel $options(loglevel)
+ }
+
+ variable types
+ array set types {
+ A 1 NS 2 MD 3 MF 4 CNAME 5 SOA 6 MB 7 MG 8 MR 9
+ NULL 10 WKS 11 PTR 12 HINFO 13 MINFO 14 MX 15 TXT 16
+ AXFR 252 MAILB 253 MAILA 254 * 255
+ }
+
+ variable classes
+ array set classes { IN 1 CS 2 CH 3 HS 4 * 255}
+
+ variable uid
+ if {![info exists uid]} {
+ set uid 0
+ }
}
# -------------------------------------------------------------------------