Check-in [16162d46b5]
Overview
Comment:Updated to not leak file descriptors for invalid sites
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:16162d46b51ed1d7336ea85311c814a8ffa6c570
User & Date: rkeene on 2014-09-10 07:54:02
Other Links: manifest | tags
Context
2014-09-10
07:55
Added basic usage check-in: 6a30dedf77 user: rkeene tags: trunk
07:54
Updated to not leak file descriptors for invalid sites check-in: 16162d46b5 user: rkeene tags: trunk
07:52
Implemented basic close mechanism check-in: e236f4717a user: rkeene tags: trunk
Changes

Modified appfsd.tcl from [ad6530f32d] to [8b965c29ef].

    27     27   
    28     28   		if {![file exists $file]} {
    29     29   			set tmpfile "${file}.new"
    30     30   
    31     31   			set fd [open $tmpfile "w"]
    32     32   			fconfigure $fd -translation binary
    33     33   
    34         -			set token [::http::geturl $url -channel $fd -binary true]
    35         -			set ncode [::http::ncode $token]
    36         -			::http::reset $token
           34  +			catch {
           35  +				set token [::http::geturl $url -channel $fd -binary true]
           36  +			}
           37  +
           38  +			if {[info exists token]} {
           39  +				set ncode [::http::ncode $token]
           40  +				::http::reset $token
           41  +			} else {
           42  +				set ncode "900"
           43  +			}
           44  +
    37     45   			close $fd
    38     46   
    39     47   			if {$keyIsHash} {
    40     48   				catch {
    41     49   					set hash [string tolower [exec openssl sha1 $tmpfile]]
    42     50   					regsub {.*= *} $hash {} hash
    43     51   				}