forked from acouzens/open5gs
AC_CHECK_LIB is added
This commit is contained in:
parent
87f2acada1
commit
66c9a25f67
|
@ -13,8 +13,7 @@ cellwired_LDADD = \
|
|||
$(top_srcdir)/src/libcellwire.la \
|
||||
$(top_srcdir)/lib/core/src/libcore.la \
|
||||
$(top_srcdir)/lib/logger/liblogger.la \
|
||||
$(top_srcdir)/lib/message/s1ap/libmessages1ap.la \
|
||||
-lpthread -lm -lsctp @OSLIBS@
|
||||
$(top_srcdir)/lib/message/s1ap/libmessages1ap.la
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir)/lib/core/include \
|
||||
|
|
|
@ -233,8 +233,12 @@ AC_CHECK_FUNCS(\
|
|||
sem_timedwait \
|
||||
)
|
||||
|
||||
AC_CHECK_LIB([crypt], [crypt], [OSLIBS="-lcrypt"])
|
||||
AC_SUBST(OSLIBS)
|
||||
#AC_CHECK_LIB([crypt], [crypt], [LIBS="${LIBS} -lcrypt"])
|
||||
AC_CHECK_LIB([pthread], [pthread_mutex_init], [LIBS="${LIBS} -lpthread"])
|
||||
#AC_CHECK_LIB([m], [cos], [LIBS="${LIBS} -lm"])
|
||||
AC_CHECK_LIB([sctp], [sctp_sendmsg], [LIBS="${LIBS} -lsctp"])
|
||||
AC_CHECK_LIB([fdcore], [fd_core_initialize], [LIBS="${LIBS} -lfdcore"])
|
||||
AC_CHECK_LIB([fdproto], [fd_libproto_init], [LIBS="${LIBS} -lfdproto"])
|
||||
|
||||
#####################
|
||||
#### Conclusion. ####
|
||||
|
|
|
@ -10,8 +10,7 @@ testcore_SOURCES = \
|
|||
abts.h abts_tests.h testutil.h
|
||||
|
||||
testcore_LDADD = \
|
||||
$(top_srcdir)/lib/core/src/libcore.la \
|
||||
-lpthread -lsctp
|
||||
$(top_srcdir)/lib/core/src/libcore.la
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir)/lib/core/include/arch/@OSDIR@ \
|
||||
|
|
|
@ -3,12 +3,16 @@
|
|||
noinst_LTLIBRARIES = libcellwire.la
|
||||
|
||||
libcellwire_la_SOURCES = \
|
||||
cellwire.h event.h context.h s1ap_build.h s1ap_conv.h s1ap_path.h \
|
||||
cellwire.h event.h context.h \
|
||||
s1ap_build.h s1ap_conv.h s1ap_path.h \
|
||||
s6_path.h \
|
||||
sm.h
|
||||
|
||||
|
||||
nodist_libcellwire_la_SOURCES = \
|
||||
init.c event.c context.c s1ap_build.c s1ap_conv.c s1ap_path.c \
|
||||
init.c event.c context.c \
|
||||
s1ap_build.c s1ap_conv.c s1ap_path.c \
|
||||
s6a_path.c \
|
||||
mme_sm.c enb_s1_sm.c
|
||||
|
||||
libcellwire_la_DEPENDENCIES = \
|
||||
|
|
17
src/mme_sm.c
17
src/mme_sm.c
|
@ -5,6 +5,7 @@
|
|||
#include "context.h"
|
||||
#include "event.h"
|
||||
#include "s1ap_path.h"
|
||||
#include "s6a_path.h"
|
||||
|
||||
void mme_state_initial(mme_sm_t *s, event_t *e)
|
||||
{
|
||||
|
@ -39,17 +40,29 @@ void mme_state_operational(mme_sm_t *s, event_t *e)
|
|||
rv = s1ap_open(s->queue_id);
|
||||
if (rv != CORE_OK)
|
||||
{
|
||||
d_error("Can't establish S1 path");
|
||||
d_error("Can't establish S1AP path");
|
||||
break;
|
||||
}
|
||||
rv = s6a_open();
|
||||
if (rv != CORE_OK)
|
||||
{
|
||||
d_error("Can't establish S6A path");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case FSM_EXIT_SIG:
|
||||
{
|
||||
rv = s6a_close();
|
||||
if (rv != CORE_OK)
|
||||
{
|
||||
d_error("Can't close S6A path");
|
||||
break;
|
||||
}
|
||||
rv = s1ap_close();
|
||||
if (rv != CORE_OK)
|
||||
{
|
||||
d_error("Can't close S1 path");
|
||||
d_error("Can't close S1AP path");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
#define TRACE_MODULE _s6a_path
|
||||
|
||||
#include "core_debug.h"
|
||||
|
||||
#include "freeDiameter/freeDiameter-host.h"
|
||||
#include "freeDiameter/libfdcore.h"
|
||||
|
||||
#include "s6a_path.h"
|
||||
|
||||
status_t s6a_open()
|
||||
{
|
||||
int ret;
|
||||
ret = fd_core_initialize ();
|
||||
if (ret != 0)
|
||||
{
|
||||
d_error("fd_core_initialize() failed");
|
||||
return ret;
|
||||
}
|
||||
return CORE_OK;
|
||||
}
|
||||
|
||||
status_t s6a_close()
|
||||
{
|
||||
int ret;
|
||||
ret = fd_core_shutdown();
|
||||
if (ret != 0)
|
||||
{
|
||||
d_error("fd_core_shutdown() failed");
|
||||
}
|
||||
|
||||
return CORE_OK;
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
#ifndef __S6A_PATH_H__
|
||||
#define __S6A_PATH_H__
|
||||
|
||||
#include "core.h"
|
||||
#include "core_pkbuf.h"
|
||||
#include "core_msgq.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
CORE_DECLARE(status_t) s6a_open();
|
||||
CORE_DECLARE(status_t) s6a_close();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* !__S1_PATH_H__ */
|
|
@ -13,8 +13,7 @@ testcellwire_LDADD = \
|
|||
$(top_srcdir)/lib/core/src/libcore.la \
|
||||
$(top_srcdir)/lib/message/s1ap/libmessages1ap.la \
|
||||
$(top_srcdir)/lib/message/nas/libmessagenas.la \
|
||||
$(top_srcdir)/src/libcellwire.la \
|
||||
-lpthread -lsctp
|
||||
$(top_srcdir)/src/libcellwire.la
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir)/lib/core/include \
|
||||
|
|
Loading…
Reference in New Issue