Mercurial > octave-nkf
diff liboctave/util/url-transfer.cc @ 18287:9a43d8d6e29e stable
avoid startup crash if curl library is not available (bug #41067)
* main-window.cc (news_reader::process): Don't attempt to use
url_transfer object unless it is valid.
* urlwrite.cc (ch_manager::do_make_curl_handle, Furlwrite, Furlread):
Likewise.
* url-transfer.cc (url_transfer::url_transfer): Don't call
disabled_error.
(disabled_error): Delete unused function.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 15 Jan 2014 15:22:03 -0500 |
parents | 870f3e12e163 |
children | 4197fc428c7d |
line wrap: on
line diff
--- a/liboctave/util/url-transfer.cc Tue Jan 14 22:13:12 2014 -0500 +++ b/liboctave/util/url-transfer.cc Wed Jan 15 15:22:03 2014 -0500 @@ -767,15 +767,6 @@ #undef SETOPT -#else - -static void -disabled_error (void) -{ - (*current_liboctave_error_handler) - ("support for url transfers was disabled when Octave was built"); -} - #endif #if defined (HAVE_CURL) @@ -785,27 +776,15 @@ #endif url_transfer::url_transfer (void) : rep (new REP_CLASS ()) -{ -#if !defined (HAVE_CURL) - disabled_error (); -#endif -} +{ } url_transfer::url_transfer (const std::string& host, const std::string& user, const std::string& passwd, std::ostream& os) : rep (new REP_CLASS (host, user, passwd, os)) -{ -#if !defined (HAVE_CURL) - disabled_error (); -#endif -} +{ } url_transfer::url_transfer (const std::string& url, std::ostream& os) : rep (new REP_CLASS (url, os)) -{ -#if !defined (HAVE_CURL) - disabled_error (); -#endif -} +{ } #undef REP_CLASS