CLEANUP: da: register the deinitialization function

deinit_deviceatlas() is not called anymore from haproxy.c, removing 2
still includes other parts of the Deviceatlas library so it was not
touched.
This commit is contained in:
Willy Tarreau 2016-12-21 21:03:49 +01:00
parent 7ac4c20509
commit b149eedd5a
3 changed files with 2 additions and 10 deletions

View File

@ -5,6 +5,5 @@
#include <types/global.h>
#include <dac.h>
void deinit_deviceatlas(void);
#endif
#endif

View File

@ -146,7 +146,7 @@ out:
return err_code;
}
void deinit_deviceatlas(void)
static void deinit_deviceatlas(void)
{
if (global.deviceatlas.jsonpath != 0) {
free(global.deviceatlas.jsonpath);
@ -374,4 +374,5 @@ static void __da_init(void)
cfg_register_keywords(&dacfg_kws);
hap_register_build_opts("Built with DeviceAtlas support.", 0);
hap_register_post_check(init_deviceatlas);
hap_register_post_deinit(deinit_deviceatlas);
}

View File

@ -113,10 +113,6 @@
#include <proto/ssl_sock.h>
#endif
#ifdef USE_DEVICEATLAS
#include <import/da.h>
#endif
/* list of config files */
static struct list cfg_cfgfiles = LIST_HEAD_INIT(cfg_cfgfiles);
int pid; /* current process id */
@ -1571,10 +1567,6 @@ static void deinit(void)
protocol_unbind_all();
#if defined(USE_DEVICEATLAS)
deinit_deviceatlas();
#endif
list_for_each_entry(pdf, &post_deinit_list, list)
pdf->fct();