Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/alpm.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/alpm.c')
-rw-r--r--lib/libalpm/alpm.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c
index 51b9e25b..6f4f4a4c 100644
--- a/lib/libalpm/alpm.c
+++ b/lib/libalpm/alpm.c
@@ -23,6 +23,11 @@
#include "config.h"
+/* connection caching setup */
+#ifdef HAVE_FETCH
+#include <fetch.h>
+#endif
+
/* libalpm */
#include "alpm.h"
#include "alpm_list.h"
@@ -54,6 +59,10 @@ int SYMEXPORT alpm_initialize(void)
bindtextdomain("libalpm", LOCALEDIR);
#endif
+#ifdef HAVE_FETCH
+ fetchConnectionCacheInit(5, 1);
+#endif
+
return(0);
}
@@ -73,6 +82,10 @@ int SYMEXPORT alpm_release(void)
_alpm_handle_free(handle);
handle = NULL;
+#ifdef HAVE_FETCH
+ fetchConnectionCacheClose();
+#endif
+
return(0);
}