Tk Library Source Code

Artifact [3f78a7f18b]
Login

Artifact 3f78a7f18bfc8d69ea00470f4fceaff633985bbb:

Attachment "ftpd_patch" to ticket [2935347fff] added by keithv 2010-01-20 07:43:05.
*** backup\00.ftpd-1.2.4.tm	Mon Dec 14 14:25:05 2009
--- ftpd-1.2.4.tm	Tue Jan 19 19:41:26 2010
***************
*** 173,190 ****
  proc ::ftpd::config {args} {
  
      # Processing of global configuration changes.
  
      package require cmdline
  
      variable cfg
  
      array set cfg [cmdline::getoptions args [list \
! 	{closeCmd.arg {} {Callback when a connection is closed.}} \
! 	{authIpCmd.arg  {} {Callback to authenticate new connections based on the ip-address of the peer. Optional}} \
! 	{authUsrCmd.arg {::ftpd::anonAuth} {Callback to authenticate new connections based on the user logging in.}} \
! 	{authFileCmd.arg {::ftpd::fileAuth} {Callback to accept or deny a users access to read and write to a specific path or file.}} \
! 	{logCmd.arg {::ftpd::logStderr} {Callback for log information generated by the FTP engine.}} \
! 	{xferDoneCmd.arg {} {Callback for transfer completion notification. Optional}} \
! 	{fsCmd.arg {::ftpd::fsFile::fs} {Callback to connect the engine to the filesystem it operates on.}}]]
      return
  }
--- 173,192 ----
  proc ::ftpd::config {args} {
  
      # Processing of global configuration changes.
  
      package require cmdline
  
      variable cfg
  
+     # make default value be the current value so we can call config
+     # multiple times without resetting already set values
      array set cfg [cmdline::getoptions args [list \
!         [list closeCmd.arg $cfg(closeCmd) {Callback when a connection is closed.}] \
!         [list authIpCmd.arg  $cfg(authIpCmd) {Callback to authenticate new connections based on the ip-address of the peer. Optional}] \
!         [list authUsrCmd.arg $cfg(authUsrCmd) {Callback to authenticate new connections based on the user logging in.}] \
!         [list authFileCmd.arg $cfg(authFileCmd) {Callback to accept or deny a users access to read and write to a specific path or file.}] \
!         [list logCmd.arg $cfg(logCmd) {Callback for log information generated by the FTP engine.}] \
!         [list xferDoneCmd.arg $cfg(xferDoneCmd) {Callback for transfer completion notification. Optional}] \
!         [list fsCmd.arg $cfg(fsCmd) {Callback to connect the engine to the filesystem it operates on.}]]]
      return
  }