Tcl Source Code

Artifact [334d9b6b8f]
Login

Artifact 334d9b6b8fbc8e77559b42a366273768e29576b5:

Attachment "patch.file" to ticket [1729950fff] added by [email protected] 2007-06-02 22:28:41.
--- http2.5.2.tcl	2007-06-02 17:18:48.546539399 +0200
+++ http2.5.2.1.tcl	2007-06-02 17:24:19.701550130 +0200
@@ -267,7 +267,7 @@
 	-timeout	integer
     }
     set state(charset)	$defaultCharset
-    set options {-binary -blocksize -channel -command -handler -headers \
+    set options {-binary -blocksize -channel -command -handler -headers -myaddr \
 	    -progress -query -queryblocksize -querychannel -queryprogress\
 	    -validate -timeout -type}
     set usage [join $options ", "]
@@ -456,9 +456,17 @@
 
     if {[info exists phost] && [string length $phost]} {
 	set srvurl $url
-	set conStat [catch {eval $defcmd $async {$phost $pport}} s]
+	if {[info exists state(-myaddr)]} {
+		set conStat [catch {eval $defcmd -myaddr $state(-myaddr) $async {$phost $pport}} s]
+	} {
+		set conStat [catch {eval $defcmd $async {$phost $pport}} s]
+	}	
     } else {
-	set conStat [catch {eval $defcmd $async {$host $port}} s]
+    	if {[info exists state(-myaddr)]} {
+    		set conStat [catch {eval $defcmd -myaddr $state(-myaddr) $async {$host $port}} s]
+    	} {
+		set conStat [catch {eval $defcmd $async {$host $port}} s]
+	}
     }
 
     if {$conStat} {