mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-20 21:53:12 +00:00
8325aacc5d
Recent changes such as the Makefile.in overhaul and the introduction of feature-driven linking broke the Android build. This commit fixes the breakage: - detects the presence of gettid() in configure.ac and only defines gettid() in serval.c if HAVE_GETTID is not defined - builds libserval.so not libservald.so on Android, to avoid a conflict on the module name "servald" in Android.mk - renames cli_cleanup() to command_cleanup(), defines it in commandline.h instead of cli.h, and supplies it in android.c - supplies the 'keyring' global in android.c - removes log_stderr.c from the Android build, since it conflicted with log.c
76 lines
2.3 KiB
C
76 lines
2.3 KiB
C
/*
|
|
Serval DNA daemon features
|
|
Copyright (C) 2016 Flinders University
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU General Public License
|
|
as published by the Free Software Foundation; either version 2
|
|
of the License, or (at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
*/
|
|
|
|
#include "feature.h"
|
|
|
|
void servald_features()
|
|
{
|
|
USE_FEATURE(cli_version);
|
|
USE_FEATURE(cli_echo);
|
|
USE_FEATURE(cli_log);
|
|
USE_FEATURE(cli_config);
|
|
USE_FEATURE(cli_server);
|
|
USE_FEATURE(cli_keyring);
|
|
USE_FEATURE(cli_network);
|
|
USE_FEATURE(cli_rhizome);
|
|
USE_FEATURE(cli_meshms);
|
|
USE_FEATURE(cli_monitor);
|
|
USE_FEATURE(cli_msp_proxy);
|
|
USE_FEATURE(cli_vomp_console);
|
|
USE_FEATURE(cli_rhizome_direct);
|
|
|
|
USE_FEATURE(mdp_binding_MDP_PORT_ECHO);
|
|
USE_FEATURE(mdp_binding_MDP_PORT_TRACE);
|
|
USE_FEATURE(mdp_binding_MDP_PORT_KEYMAPREQUEST);
|
|
USE_FEATURE(mdp_binding_MDP_PORT_DNALOOKUP);
|
|
USE_FEATURE(mdp_binding_MDP_PORT_PROBE);
|
|
USE_FEATURE(mdp_binding_MDP_PORT_STUN);
|
|
USE_FEATURE(mdp_binding_MDP_PORT_STUNREQ);
|
|
USE_FEATURE(mdp_binding_MDP_PORT_LINKSTATE);
|
|
USE_FEATURE(mdp_binding_MDP_PORT_VOMP);
|
|
USE_FEATURE(mdp_binding_MDP_PORT_RHIZOME_SYNC);
|
|
USE_FEATURE(mdp_binding_MDP_PORT_RHIZOME_SYNC_KEYS);
|
|
USE_FEATURE(mdp_binding_MDP_PORT_RHIZOME_REQUEST);
|
|
USE_FEATURE(mdp_binding_MDP_PORT_RHIZOME_RESPONSE);
|
|
USE_FEATURE(mdp_binding_MDP_PORT_RHIZOME_MANIFEST_REQUEST);
|
|
|
|
USE_FEATURE(http_server);
|
|
USE_FEATURE(http_rhizome);
|
|
USE_FEATURE(http_rhizome_direct);
|
|
USE_FEATURE(http_rest_keyring);
|
|
USE_FEATURE(http_rest_rhizome);
|
|
USE_FEATURE(http_rest_meshms);
|
|
}
|
|
|
|
#include <assert.h>
|
|
#include "overlay_address.h"
|
|
#include "rhizome.h"
|
|
#include "cli.h"
|
|
#include "keyring.h"
|
|
|
|
__thread keyring_file *keyring = NULL;
|
|
|
|
void command_cleanup()
|
|
{
|
|
// This function is called after every CLI command has finished.
|
|
rhizome_close_db();
|
|
free_subscribers();
|
|
assert(keyring==NULL);
|
|
}
|