changeset 17556:9e8a9f043944

fix error in previous commit * urlwrite.cc (ch_manager::make_curl_handle): New arg, OS. (ch_manager::do_make_curl_handle): Likewise. Pass OS to url_transfer instead of unconditionally passing octave_stdout.
author John W. Eaton <jwe@octave.org>
date Thu, 03 Oct 2013 16:23:56 -0400
parents 0946b0e06544
children 58039875767d
files libinterp/corefcn/urlwrite.cc
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/urlwrite.cc	Thu Oct 03 15:52:49 2013 -0400
+++ b/libinterp/corefcn/urlwrite.cc	Thu Oct 03 16:23:56 2013 -0400
@@ -131,10 +131,11 @@
 
   static curl_handle make_curl_handle (const std::string& host,
                                        const std::string& user,
-                                       const std::string& passwd)
+                                       const std::string& passwd,
+                                       std::ostream& os)
   {
     return instance_ok ()
-      ? instance->do_make_curl_handle (host, user, passwd) : curl_handle ();
+      ? instance->do_make_curl_handle (host, user, passwd, os) : curl_handle ();
   }
 
   static Matrix handle_list (void)
@@ -181,11 +182,12 @@
 
   curl_handle do_make_curl_handle (const std::string& host,
                                    const std::string& user,
-                                   const std::string& passwd)
+                                   const std::string& passwd,
+                                   std::ostream& os)
   {
     curl_handle h = get_handle ();
 
-    url_transfer obj (host, user, passwd, octave_stdout);
+    url_transfer obj (host, user, passwd, os);
 
     if (! error_state)
       handle_map[h] = obj;