[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libebics] branch master updated: Init & destroy GNUnet CUR
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libebics] branch master updated: Init & destroy GNUnet CURL. |
Date: |
Tue, 16 Oct 2018 15:41:03 +0200 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository libebics.
The following commit(s) were added to refs/heads/master by this push:
new e4e0b74 Init & destroy GNUnet CURL.
e4e0b74 is described below
commit e4e0b74d654e03d2d2c2a4732a96c98c4bf0771a
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue Oct 16 15:40:42 2018 +0200
Init & destroy GNUnet CURL.
---
configure.ac | 2 +-
src/Makefile.am | 3 ++-
src/libebics.c | 27 +++++++++++++++++++++++++++
3 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index f090ef7..7448186 100644
--- a/configure.ac
+++ b/configure.ac
@@ -176,7 +176,7 @@ AC_SUBST(GNUTLS_CFLAGS)
AC_SUBST(GNUTLS_LIBS)
AC_SUBST(GNUTLS_MIN_VERSION)
-CPPFLAGS="$XML_CPPFLAGS $CPPFLAGS $LIBCURL $LIBCURL_CPPFLAGS $XMLSEC1_CFLAGS
$LIBGNUTLS_CFLAGS $ZLIB_CFLAGS"
+CPPFLAGS="$XML_CPPFLAGS $CPPFLAGS $XMLSEC1_CFLAGS $LIBGNUTLS_CFLAGS
$ZLIB_CFLAGS"
AC_CONFIG_FILES([Makefile
m4/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index 33169d1..0240689 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -22,7 +22,8 @@ libebics_la_LIBADD = \
$(GNUTLS_LIBS) \
$(ZLIB_LIBS) \
$(XLIB) \
- -lgnunetutil
+ -lgnunetutil \
+ -lgnunetcurl
libebics_CPPFLAGS = \
$(XML_CPPFLAGS) \
diff --git a/src/libebics.c b/src/libebics.c
index 18809ec..ff2ab36 100644
--- a/src/libebics.c
+++ b/src/libebics.c
@@ -30,6 +30,7 @@
#include "libebics.h"
#include <gnunet/platform.h>
#include <gnunet/gnunet_util_lib.h>
+#include <gnunet/gnunet_curl_lib.h>
#define LOG(level,...) \
EBICS_util_log_from (__LINE__, \
@@ -39,6 +40,16 @@
"libebics", \
__VA_ARGS__)
+/**
+ * GNUnet CURL Context
+ */
+static struct GNUNET_CURL_Context *ctx;
+
+/**
+ * Reschedule context for GNUnet CURL
+ */
+static struct GNUNET_CURL_RescheduleContext *reschedule_ctx;
+
static const struct GNUNET_OS_ProjectData libebics_pd = {
.libname = "libebics",
.project_dirname = "libebics",
@@ -688,6 +699,19 @@ EBICS_init_library (const char *key_dir,
return EBICS_ERROR;
}
+ reschedule_ctx = GNUNET_CURL_gnunet_rc_create
+ /* Not allocated yet */
+ (ctx);
+
+ if (NULL == (ctx = GNUNET_CURL_init
+ (GNUNET_CURL_gnunet_scheduler_reschedule,
+ reschedule_ctx)))
+ {
+ LOG (EBICS_LOGLEVEL_FATAL,
+ "Could not init GNUnet CURL\n");
+ return EBICS_ERROR;
+ }
+
GNUNET_free (data_dir);
return EBICS_SUCCESS;
}
@@ -720,6 +744,9 @@ EBICS_close_library ()
free_genex_documents (genexList);
free_keymaterial (keyList);
+
+ GNUNET_CURL_fini (ctx);
+ GNUNET_CURL_gnunet_rc_destroy (reschedule_ctx);
}
/**
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [libebics] branch master updated: Init & destroy GNUnet CURL.,
gnunet <=