[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet-ext] branch master updated: Add initialization to s
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet-ext] branch master updated: Add initialization to service |
Date: |
Mon, 09 Sep 2019 01:53:39 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet-ext.
The following commit(s) were added to refs/heads/master by this push:
new d299b41 Add initialization to service
d299b41 is described below
commit d299b411ec72826aa87f629b52d07cdc5fc4ad29
Author: Alessio Vanni <address@hidden>
AuthorDate: Sun Sep 8 16:29:11 2019 +0200
Add initialization to service
Signed-off-by: Christian Grothoff <address@hidden>
---
src/ext/gnunet-service-ext.c | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/src/ext/gnunet-service-ext.c b/src/ext/gnunet-service-ext.c
index 4ebcdf2..83cbd52 100644
--- a/src/ext/gnunet-service-ext.c
+++ b/src/ext/gnunet-service-ext.c
@@ -68,6 +68,38 @@ struct ClientContext
*/
static const struct GNUNET_CONFIGURATION_Handle *cfg;
+/**
+ * This structure holds informations about the project.
+ */
+static const struct GNUNET_OS_ProjectData gnunetext_pd =
+{
+ .libname = "libgnunetext",
+ .project_dirname = "gnunet-ext",
+ .binary_name = "gnunet-service-ext",
+ .env_varname = "GNUNET_EXT_PREFIX",
+ .base_config_varname = "GNUNET_EXT_BASE_CONFIG",
+ .bug_email = "address@hidden",
+ .homepage = "http://www.gnu.org/s/gnunet/",
+ .config_file = "gnunet-ext.conf",
+ .user_config_file = "~/.config/gnunet-ext.conf",
+ .version = "1.0",
+ .is_gnu = 1,
+ .gettext_domain = PACKAGE,
+ .gettext_path = NULL,
+};
+
+/**
+ * Initialize the project with the data set in the
+ * GNUNET_OS_ProjectData structure. This is defined with
+ * __attribute__ ((constructor)) because it has to be called before
+ * the main function (implicitly defined by GNUNET_SERVICE_MAIN.)
+ * Other "pre-main" initialization can be performed here too.
+ */
+static void __attribute__ ((constructor))
+project_data_initialize (void)
+{
+ GNUNET_OS_init (&gnunetext_pd);
+}
/**
* Handle EXT-message.
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [gnunet-ext] branch master updated: Add initialization to service,
gnunet <=