| | |
| | | #include "bh_api.h" |
| | | #include <pthread.h> |
| | | #include <getopt.h> |
| | | #include "msg_mgr.h" |
| | | #include "../proto/source/error_msg.pb.h" |
| | | #include "../proto/source/bhome_msg.pb.h" |
| | | #include "../proto/source/bhome_msg_api.pb.h" |
| | |
| | | memset(&pData, 0x00, sizeof(ProcInfo)); |
| | | if (gRun_stat == 0) { |
| | | pthread_mutex_init(&mutex, NULL); |
| | | |
| | | #if defined(MSG_HANDLER) |
| | | msg_init(); |
| | | #endif |
| | | |
| | | } else { |
| | | logger->error("the process has already registered!\n"); |
| | |
| | | |
| | | } |
| | | |
| | | #if defined(MSG_HANDLER) |
| | | int inter_key_get(void) |
| | | { |
| | | return net_mod_socket_get_key(gNetmod_socket); |
| | | } |
| | | if (gNetmod_socket != NULL) |
| | | return net_mod_socket_get_key(gNetmod_socket); |
| | | |
| | | return 0; |
| | | } |
| | | #endif |
| | | |