mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-26 21:31:01 +01:00
CLEANUP: wurfl: register the deinit function via the dedicated list
By registering the deinit function we avoid another #ifdef in haproxy.c. The ha_wurfl_deinit() function has been made static and unexported. Now proto/wurfl.h is totally empty, the code being self-contained in wurfl.c, so the useless .h has been removed.
This commit is contained in:
parent
05554e6bf1
commit
800f93f375
@ -1,6 +0,0 @@
|
||||
#ifndef _PROTO_WURFL_H
|
||||
#define _PROTO_WURFL_H
|
||||
|
||||
void ha_wurfl_deinit(void);
|
||||
|
||||
#endif
|
||||
@ -113,10 +113,6 @@
|
||||
#include <proto/ssl_sock.h>
|
||||
#endif
|
||||
|
||||
#ifdef USE_WURFL
|
||||
#include <proto/wurfl.h>
|
||||
#endif
|
||||
|
||||
#ifdef USE_DEVICEATLAS
|
||||
#include <import/da.h>
|
||||
#endif
|
||||
@ -1587,10 +1583,6 @@ static void deinit(void)
|
||||
deinit_51degrees();
|
||||
#endif
|
||||
|
||||
#ifdef USE_WURFL
|
||||
ha_wurfl_deinit();
|
||||
#endif
|
||||
|
||||
list_for_each_entry(pdf, &post_deinit_list, list)
|
||||
pdf->fct();
|
||||
|
||||
|
||||
@ -9,7 +9,6 @@
|
||||
#include <proto/log.h>
|
||||
#include <proto/proto_http.h>
|
||||
#include <proto/sample.h>
|
||||
#include <proto/wurfl.h>
|
||||
#include <ebsttree.h>
|
||||
#include <ebmbtree.h>
|
||||
|
||||
@ -475,7 +474,7 @@ static int ha_wurfl_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ha_wurfl_deinit(void)
|
||||
static void ha_wurfl_deinit(void)
|
||||
{
|
||||
wurfl_information_t *wi, *wi2;
|
||||
wurfl_patches_t *wp, *wp2;
|
||||
@ -675,6 +674,7 @@ static void __wurfl_init(void)
|
||||
cfg_register_keywords(&wurflcfg_kws);
|
||||
hap_register_build_opts("Built with WURFL support.", 0);
|
||||
hap_register_post_check(ha_wurfl_init);
|
||||
hap_register_post_deinit(ha_wurfl_deinit);
|
||||
}
|
||||
|
||||
// WURFL properties wrapper functions
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user