Rename message queue functions
This commit is contained in:
parent
f0c5146563
commit
33099da3b7
@ -22,7 +22,7 @@ static int ac_init(void) {
|
||||
g_ac.standalone = 1;
|
||||
|
||||
/* Sessions message queue */
|
||||
if (!ac_session_msgqueue_init()) {
|
||||
if (!ac_msgqueue_init()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@ static void ac_destroy(void) {
|
||||
capwap_list_free(g_ac.sessionsdata);
|
||||
capwap_list_free(g_ac.sessionsthread);
|
||||
capwap_rwlock_destroy(&g_ac.sessionslock);
|
||||
ac_session_msgqueue_free();
|
||||
ac_msgqueue_free();
|
||||
|
||||
/* Backend */
|
||||
if (g_ac.backendacid) {
|
||||
|
@ -75,7 +75,7 @@ static void ac_wait_terminate_allsessions(void) {
|
||||
}
|
||||
|
||||
/* Initialize message queue */
|
||||
int ac_session_msgqueue_init(void) {
|
||||
int ac_msgqueue_init(void) {
|
||||
if (socketpair(AF_LOCAL, SOCK_DGRAM, 0, g_ac.fdmsgsessions)) {
|
||||
return 0;
|
||||
}
|
||||
@ -84,13 +84,13 @@ int ac_session_msgqueue_init(void) {
|
||||
}
|
||||
|
||||
/* Free sessions message queue */
|
||||
void ac_session_msgqueue_free(void) {
|
||||
void ac_msgqueue_free(void) {
|
||||
close(g_ac.fdmsgsessions[1]);
|
||||
close(g_ac.fdmsgsessions[0]);
|
||||
}
|
||||
|
||||
/* */
|
||||
void ac_session_msgqueue_notify_closethread(pthread_t threadid) {
|
||||
void ac_msgqueue_notify_closethread(pthread_t threadid) {
|
||||
struct ac_session_msgqueue_item_t item;
|
||||
|
||||
/* Send message */
|
||||
|
@ -523,7 +523,7 @@ void* ac_session_thread(void* param) {
|
||||
capwap_logging_debug("Session end");
|
||||
|
||||
/* Notify terminate thread */
|
||||
ac_session_msgqueue_notify_closethread(threadid);
|
||||
ac_msgqueue_notify_closethread(threadid);
|
||||
|
||||
/* Thread exit */
|
||||
pthread_exit(NULL);
|
||||
|
@ -137,9 +137,9 @@ void ac_free_reference_last_request(struct ac_session_t* session);
|
||||
void ac_free_reference_last_response(struct ac_session_t* session);
|
||||
|
||||
/* */
|
||||
int ac_session_msgqueue_init(void);
|
||||
void ac_session_msgqueue_free(void);
|
||||
void ac_session_msgqueue_notify_closethread(pthread_t threadid);
|
||||
int ac_msgqueue_init(void);
|
||||
void ac_msgqueue_free(void);
|
||||
void ac_msgqueue_notify_closethread(pthread_t threadid);
|
||||
|
||||
/* */
|
||||
int ac_dtls_setup(struct ac_session_t* session);
|
||||
|
@ -399,7 +399,7 @@ void* ac_session_data_thread(void* param) {
|
||||
capwap_logging_debug("Session data end");
|
||||
|
||||
/* Notify terminate thread */
|
||||
ac_session_msgqueue_notify_closethread(threadid);
|
||||
ac_msgqueue_notify_closethread(threadid);
|
||||
|
||||
/* Thread exit */
|
||||
pthread_exit(NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user