changeset 1907:bc245b3ad09c

Allow for the neon http VFS plugin to work without neon 0.27 by using weak attributes.
author William Pitcock <nenolod@atheme.org>
date Thu, 27 Sep 2007 13:04:56 -0500
parents a0c7cf5638de
children b37cea7ef4a9
files src/neon/neon.c
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/neon/neon.c	Thu Sep 27 00:38:59 2007 -0500
+++ b/src/neon/neon.c	Thu Sep 27 13:04:56 2007 -0500
@@ -53,6 +53,11 @@
     neon_vfs_metadata_impl
 };
 
+/* bring ne_set_connect_timeout in as a weak reference, not using it
+ * unless we have it available (neon 0.27) --nenolod
+ */
+extern void ne_set_connect_timeout(ne_session *sess, int timeout) __attribute__ ((weak));
+
 /*
  * ========
  */
@@ -565,7 +570,10 @@
         ne_add_server_auth(handle->session, NE_AUTH_BASIC, server_auth_callback, (void *)handle);
         ne_set_session_flag(handle->session, NE_SESSFLAG_ICYPROTO, 1);
         ne_set_session_flag(handle->session, NE_SESSFLAG_PERSIST, 0);
-        ne_set_connect_timeout(handle->session, 10);
+
+        if (ne_set_connect_timeout != NULL)
+            ne_set_connect_timeout(handle->session, 10);
+
         ne_set_read_timeout(handle->session, 10);
         ne_set_useragent(handle->session, "Audacious/1.4.0");
         ne_redirect_register(handle->session);