don't include hnbgw.h from ranap header files

To use libosmo-ranap from outside of this repository, we need to
eliminated all dependencies to local header files
This commit is contained in:
Harald Welte 2016-01-03 17:04:09 +01:00
parent de6a11bb17
commit bdf3fd1dc4
6 changed files with 15 additions and 4 deletions

View File

@ -434,6 +434,7 @@ int main(int argc, char **argv)
}
osmo_sua_set_log_area(DSUA);
ranap_set_log_area(DRANAP);
g_hnb_gw->cnlink_cs = hnbgw_cnlink_init(g_hnb_gw, "127.0.0.1", SUA_PORT);
g_hnb_gw->cnlink_ps = hnbgw_cnlink_init(g_hnb_gw, "127.0.0.2", SUA_PORT);

View File

@ -24,9 +24,10 @@
#include <osmocom/gsm/gsm48.h>
#include "ranap_common.h"
#include "hnbgw.h"
extern int asn1_xer_print;
int _ranap_DRANAP = 0;
#define DRANAP _ranap_DRANAP
const struct value_string ranap_presence_vals[5] = {
{ RANAP_RANAP_PDU_PR_initiatingMessage, "Initiating" },
@ -517,3 +518,8 @@ int ranap_parse_lai(struct gprs_ra_id *ra_id, const RANAP_LAI_t *lai)
return 0;
}
void ranap_set_log_area(int log_area)
{
_ranap_DRANAP = log_area;
}

View File

@ -590,8 +590,8 @@
#include <osmocom/core/logging.h>
#include <osmocom/core/utils.h>
#include "hnbgw.h"
#define RANAP_DEBUG(x, args ...) DEBUGP(DRANAP, x, ## args)
#define RANAP_DEBUG(x, args ...) DEBUGP(_ranap_DRANAP, x, ## args)
extern int _ranap_DRANAP;
extern int asn1_xer_print;
@ -630,3 +630,5 @@ RANAP_ProtocolIE_FieldPair_t *ranap_new_ie_pair(RANAP_ProtocolIE_ID_t id,
asn_TYPE_descriptor_t *type1, void *sptr1,
RANAP_Criticality_t criticality2,
asn_TYPE_descriptor_t *type2, void *sptr2);
void ranap_set_log_area(int log_area);

View File

@ -28,7 +28,7 @@
#include "ranap_ies_defs.h"
#include "ranap_msg_factory.h"
#include "hnbgw.h"
#define DRANAP _ranap_DRANAP
/*! \brief allocate a new long and assing a value to it */
static long *new_long(long in)

View File

@ -307,6 +307,7 @@ int main(int argc, char **argv)
int rc;
osmo_sua_set_log_area(DSUA);
ranap_set_log_area(DRANAP);
test_common_init();

View File

@ -84,4 +84,5 @@ int test_common_init(void)
if (rc < 0)
exit(1);
ranap_set_log_area(DRANAP);
}