comparison libinterp/corefcn/urlwrite.cc @ 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 43b9181340fb
comparison
equal deleted inserted replaced
17555:0946b0e06544 17556:9e8a9f043944
129 return instance_ok () ? instance->do_get_object (h) : url_transfer (); 129 return instance_ok () ? instance->do_get_object (h) : url_transfer ();
130 } 130 }
131 131
132 static curl_handle make_curl_handle (const std::string& host, 132 static curl_handle make_curl_handle (const std::string& host,
133 const std::string& user, 133 const std::string& user,
134 const std::string& passwd) 134 const std::string& passwd,
135 std::ostream& os)
135 { 136 {
136 return instance_ok () 137 return instance_ok ()
137 ? instance->do_make_curl_handle (host, user, passwd) : curl_handle (); 138 ? instance->do_make_curl_handle (host, user, passwd, os) : curl_handle ();
138 } 139 }
139 140
140 static Matrix handle_list (void) 141 static Matrix handle_list (void)
141 { 142 {
142 return instance_ok () ? instance->do_handle_list () : Matrix (); 143 return instance_ok () ? instance->do_handle_list () : Matrix ();
179 return (p != handle_map.end ()) ? p->second : url_transfer (); 180 return (p != handle_map.end ()) ? p->second : url_transfer ();
180 } 181 }
181 182
182 curl_handle do_make_curl_handle (const std::string& host, 183 curl_handle do_make_curl_handle (const std::string& host,
183 const std::string& user, 184 const std::string& user,
184 const std::string& passwd) 185 const std::string& passwd,
186 std::ostream& os)
185 { 187 {
186 curl_handle h = get_handle (); 188 curl_handle h = get_handle ();
187 189
188 url_transfer obj (host, user, passwd, octave_stdout); 190 url_transfer obj (host, user, passwd, os);
189 191
190 if (! error_state) 192 if (! error_state)
191 handle_map[h] = obj; 193 handle_map[h] = obj;
192 else 194 else
193 h = curl_handle (); 195 h = curl_handle ();