add usrsctp_finish
This commit is contained in:
parent
3bf6326763
commit
7b046c75b2
|
@ -64,6 +64,8 @@ void mme_terminate(void)
|
|||
|
||||
mme_context_final();
|
||||
|
||||
s1ap_final();
|
||||
|
||||
gtp_xact_final();
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,8 @@ CORE_DECLARE(status_t) s1ap_close();
|
|||
|
||||
CORE_DECLARE(status_t) s1ap_sctp_close(net_sock_t *sock);
|
||||
|
||||
CORE_DECLARE(status_t) s1ap_final();
|
||||
|
||||
#if 0 /* depreciated */
|
||||
CORE_DECLARE(status_t) s1ap_send(net_sock_t *s, pkbuf_t *pkb);
|
||||
#endif
|
||||
|
|
|
@ -58,6 +58,11 @@ status_t s1ap_sctp_close(net_sock_t *sock)
|
|||
return CORE_OK;
|
||||
}
|
||||
|
||||
status_t s1ap_final()
|
||||
{
|
||||
return CORE_OK;
|
||||
}
|
||||
|
||||
static int s1ap_accept_cb(net_sock_t *net_sock, void *data)
|
||||
{
|
||||
char buf[INET_ADDRSTRLEN];
|
||||
|
|
|
@ -116,24 +116,34 @@ status_t s1ap_open(void)
|
|||
return CORE_OK;
|
||||
}
|
||||
|
||||
status_t s1ap_close()
|
||||
status_t s1ap_final()
|
||||
{
|
||||
struct socket *psock = (struct socket *)mme_self()->s1ap_sock;
|
||||
d_assert(mme_self(), return CORE_ERROR, "Null param");
|
||||
d_assert(mme_self()->s1ap_sock != NULL, return CORE_ERROR,
|
||||
"S1-ENB path already opened");
|
||||
|
||||
accept_thread_should_stop = 1;
|
||||
usrsctp_close(psock);
|
||||
#if 0 /* FIXME : how to release usrsctp_accept() blocking */
|
||||
while(usrsctp_finish() != 0)
|
||||
{
|
||||
d_error("try to finsih SCTP\n");
|
||||
core_sleep(time_from_msec(1000));
|
||||
}
|
||||
|
||||
#if 0
|
||||
thread_delete(accept_thread);
|
||||
#else
|
||||
d_error("[FIXME] should delete accept_thread : "
|
||||
"how to release usrsctp_accept() blocking?");
|
||||
#endif
|
||||
return CORE_OK;
|
||||
}
|
||||
|
||||
status_t s1ap_close()
|
||||
{
|
||||
struct socket *psock = NULL;
|
||||
|
||||
d_assert(mme_self(), return CORE_ERROR, "Null param");
|
||||
d_assert(mme_self()->s1ap_sock != NULL, return CORE_ERROR,
|
||||
"S1-ENB path already opened");
|
||||
|
||||
psock = (struct socket *)mme_self()->s1ap_sock;
|
||||
usrsctp_close(psock);
|
||||
|
||||
return CORE_OK;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue