mirror of
https://github.com/rkd77/elinks.git
synced 2025-05-18 00:48:57 -04:00
[config] curl's ftp related code requires libevent. Refs #240
It does not compile with libev.
This commit is contained in:
parent
e69168c58a
commit
651e4e72e8
@ -77,7 +77,7 @@ do { \
|
|||||||
#define FD_SETSIZE 1024
|
#define FD_SETSIZE 1024
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_LIBEVENT
|
#ifdef CONFIG_LIBEVENT
|
||||||
|
|
||||||
/* Information associated with a specific easy handle */
|
/* Information associated with a specific easy handle */
|
||||||
typedef struct _ConnInfo
|
typedef struct _ConnInfo
|
||||||
@ -777,6 +777,7 @@ select_loop(void (*init)(void))
|
|||||||
periodic_redraw_all_terminals(NULL);
|
periodic_redraw_all_terminals(NULL);
|
||||||
#ifdef USE_LIBEVENT
|
#ifdef USE_LIBEVENT
|
||||||
if (event_enabled) {
|
if (event_enabled) {
|
||||||
|
#if defined(CONFIG_LIBCURL) && defined(CONFIG_LIBEVENT)
|
||||||
memset(&g, 0, sizeof(GlobalInfo));
|
memset(&g, 0, sizeof(GlobalInfo));
|
||||||
g.evbase = event_base;
|
g.evbase = event_base;
|
||||||
curl_global_init(CURL_GLOBAL_DEFAULT);
|
curl_global_init(CURL_GLOBAL_DEFAULT);
|
||||||
@ -793,6 +794,7 @@ select_loop(void (*init)(void))
|
|||||||
curl_multi_setopt(g.multi, CURLMOPT_TIMERDATA, &g);
|
curl_multi_setopt(g.multi, CURLMOPT_TIMERDATA, &g);
|
||||||
|
|
||||||
/* we do not call any curl_multi_socket*() function yet as we have no handles added! */
|
/* we do not call any curl_multi_socket*() function yet as we have no handles added! */
|
||||||
|
#endif
|
||||||
|
|
||||||
while (!program.terminate) {
|
while (!program.terminate) {
|
||||||
check_signals();
|
check_signals();
|
||||||
@ -805,11 +807,12 @@ select_loop(void (*init)(void))
|
|||||||
}
|
}
|
||||||
kill_timer(&periodic_redraw_timer);
|
kill_timer(&periodic_redraw_timer);
|
||||||
|
|
||||||
|
#if defined(CONFIG_LIBCURL) && defined(CONFIG_LIBEVENT)
|
||||||
event_del(&g.timer_event);
|
event_del(&g.timer_event);
|
||||||
//event_base_free(g.evbase);
|
//event_base_free(g.evbase);
|
||||||
curl_multi_cleanup(g.multi);
|
curl_multi_cleanup(g.multi);
|
||||||
curl_global_cleanup();
|
curl_global_cleanup();
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
|
@ -10,7 +10,7 @@ extern "C" {
|
|||||||
|
|
||||||
extern struct module ftpes_protocol_module;
|
extern struct module ftpes_protocol_module;
|
||||||
|
|
||||||
#if defined(CONFIG_FTP) && defined(CONFIG_LIBCURL)
|
#if defined(CONFIG_FTP) && defined(CONFIG_LIBCURL) && defined(CONFIG_LIBEVENT)
|
||||||
extern protocol_handler_T ftpes_protocol_handler;
|
extern protocol_handler_T ftpes_protocol_handler;
|
||||||
#else
|
#else
|
||||||
#define ftpes_protocol_handler NULL
|
#define ftpes_protocol_handler NULL
|
||||||
|
@ -10,7 +10,7 @@ extern "C" {
|
|||||||
|
|
||||||
extern struct module sftp_protocol_module;
|
extern struct module sftp_protocol_module;
|
||||||
|
|
||||||
#ifdef CONFIG_LIBCURL
|
#if defined(CONFIG_LIBCURL) && defined(CONFIG_LIBEVENT)
|
||||||
extern protocol_handler_T sftp_protocol_handler;
|
extern protocol_handler_T sftp_protocol_handler;
|
||||||
#else
|
#else
|
||||||
#define sftp_protocol_handler NULL
|
#define sftp_protocol_handler NULL
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
if conf_data.get('CONFIG_BITTORRENT')
|
if conf_data.get('CONFIG_BITTORRENT')
|
||||||
subdir('bittorrent')
|
subdir('bittorrent')
|
||||||
endif
|
endif
|
||||||
if conf_data.get('CONFIG_LIBCURL')
|
if conf_data.get('CONFIG_LIBCURL') and conf_data.get('CONFIG_LIBEVENT')
|
||||||
subdir('curl')
|
subdir('curl')
|
||||||
endif
|
endif
|
||||||
if conf_data.get('CONFIG_FINGER')
|
if conf_data.get('CONFIG_FINGER')
|
||||||
|
@ -317,7 +317,7 @@ static struct module *protocol_submodules[] = {
|
|||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_FTP
|
#ifdef CONFIG_FTP
|
||||||
&ftp_protocol_module,
|
&ftp_protocol_module,
|
||||||
#ifdef CONFIG_LIBCURL
|
#if defined(CONFIG_LIBCURL) && defined(CONFIG_LIBEVENT)
|
||||||
&ftpes_protocol_module,
|
&ftpes_protocol_module,
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@ -331,7 +331,7 @@ static struct module *protocol_submodules[] = {
|
|||||||
#ifdef CONFIG_NNTP
|
#ifdef CONFIG_NNTP
|
||||||
&nntp_protocol_module,
|
&nntp_protocol_module,
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_LIBCURL
|
#if defined(CONFIG_LIBCURL) && defined(CONFIG_LIBEVENT)
|
||||||
&sftp_protocol_module,
|
&sftp_protocol_module,
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SMB
|
#ifdef CONFIG_SMB
|
||||||
|
Loading…
x
Reference in New Issue
Block a user