diff scripts/@ftp/loadobj.m @ 17548:92541ff4cc3c

improve implementation of ftp object handles * urlwrite.cc (curl_handles): Delete class. (handles): Delete static variable. (ch_manager): New class. (make_handle_fraction): New function. (F__ftp_pwd__, F__ftp_cwd__, F__ftp_dir__, F__ftp_ascii__, F__ftp_binary__, F__ftp_mode__, F__ftp_delete__, F__ftp_rmdir__, F__ftp_mkdir__, F__ftp_rename__, F__ftp_mput__, F__ftp_mget__): Find curl object corresponding to given handle using ch_manager instead of looking in handles map. (F__ftp__): Return handle instead of accepting it as argument. Change all uses.
author John W. Eaton <jwe@octave.org>
date Wed, 02 Oct 2013 23:40:01 -0400
parents 1c89599167a6
children d63878346099
line wrap: on
line diff
--- a/scripts/@ftp/loadobj.m	Wed Oct 02 23:33:02 2013 -0400
+++ b/scripts/@ftp/loadobj.m	Wed Oct 02 23:40:01 2013 -0400
@@ -21,8 +21,7 @@
   if (isfield (b, "jobject"))
     b = rmfield (b, "jobject");
   endif
-  b.curlhandle = tmpnam ("ftp-");
-  __ftp__ (b.curlhandle, b.host, b.username, b.password);
+  b.curlhandle = __ftp__ (b.host, b.username, b.password);
   if (isfield (b, "dir"))
     if (! isempty (b.dir))
       __ftp_cwd__ (b.curlhandle, b.dir);