bsscomm variables issue

This commit is contained in:
2024-10-19 15:19:43 +08:00
parent cabe3092e6
commit 8043035fef
3 changed files with 38 additions and 21 deletions

View File

@@ -16,11 +16,11 @@
char OMC_0_IP[16]; char OMC_0_IP[16];
char OMC_1_IP[16]; char OMC_1_IP[16];
MYSQL omcDbConn,*omcDb_sock;
// by simon at 2024/10/19 begin --- // by simon at 2024/10/19 begin ---
// MYSQL_RES *result; extern MYSQL omcDbConn,*omcDb_sock;
// MYSQL_ROW row; extern MYSQL_RES *result;
// char sqlstring[128]; extern MYSQL_ROW row;
extern char sqlstring[128];
// ---end // ---end
static int udp_sockfd; static int udp_sockfd;

View File

@@ -7,6 +7,23 @@
#include "includes.h" #include "includes.h"
#include "bss_hb.h" #include "bss_hb.h"
/* Global variables by simon
*/
MYSQL mysql, *mysql_sock;
MYSQL_RES *result;
MYSQL_ROW row;
char sqlstring[SQLSTRING_LEN];
int num_of_mysql_table;
char **mysql_tables;
int monitor_fd = -1;
tImpConn *BssConn;
tImpConn **bsplus;
tImpConn **bsplus_down;
tImpEvent BssEvent;
struct queue CmdBuffer[CMD_BUFFER_SIZE];
int CmdBufferPtr = 0;
/* /*
* Variables that are initialized when process is started * Variables that are initialized when process is started
* *
@@ -4491,7 +4508,7 @@ void setup_daemon(void);
/************************************************* /*************************************************
Function: // main Function: // main
Description: // <20><><EFBFBD><EFBFBD>ImpConnMultiplexerģ<72><EFBFBD><E9A3AC>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Description: // <20><><EFBFBD><EFBFBD>ImpConnMultiplexerģ<72><EFBFBD><E9A3AC>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Calls: // imp_init; Calls: // imp_init;
Called By: // Called By: //
Table Accessed: // Table Accessed: //
@@ -4528,7 +4545,7 @@ int main(int argc, char *argv[])
/************************************************* /*************************************************
Function: // onTimer Function: // onTimer
Description: // <20><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Description: // <20><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Calls: // ImpConnMultiplexer; Calls: // ImpConnMultiplexer;
Called By: // Called By: //
Table Accessed: // Table Accessed: //
@@ -4550,7 +4567,7 @@ void onTimer()
/************************************************* /*************************************************
Function: // setTimer Function: // setTimer
Description: // <20><><EFBFBD>ö<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Description: // <20><><EFBFBD>ö<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Calls: // onTimer; Calls: // onTimer;
Called By: // Called By: //
Table Accessed: // Table Accessed: //

View File

@@ -115,18 +115,18 @@
#define PASSWD "noitacilpPA#68*" #define PASSWD "noitacilpPA#68*"
#define SQLSTRING_LEN 16384 // 16384 = 2^14 #define SQLSTRING_LEN 16384 // 16384 = 2^14
MYSQL mysql,*mysql_sock; // MYSQL mysql,*mysql_sock;
MYSQL_RES *result; // MYSQL_RES *result;
MYSQL_ROW row; // MYSQL_ROW row;
//MYSQL_FIELD *field; // //MYSQL_FIELD *field;
char sqlstring[SQLSTRING_LEN]; // char sqlstring[SQLSTRING_LEN];
/* /*
* Store the name of MYSQL tablename at program startup * Store the name of MYSQL tablename at program startup
*/ */
#define MAX_NUM_OF_SQL_TABLE 100 #define MAX_NUM_OF_SQL_TABLE 100
int num_of_mysql_table; // int num_of_mysql_table;
char **mysql_tables; // char **mysql_tables;
#define NMIPORT 2112 #define NMIPORT 2112
#define BUFMAX 4096 #define BUFMAX 4096
@@ -139,7 +139,7 @@ char **mysql_tables;
* For BSS momitor * For BSS momitor
*/ */
#define MONITOR_PORT 5354 #define MONITOR_PORT 5354
int monitor_fd=-1; // int monitor_fd=-1;
#define TIME_LEN 9 #define TIME_LEN 9
@@ -241,9 +241,9 @@ struct ImpConn {
}; };
typedef struct ImpConn tImpConn; typedef struct ImpConn tImpConn;
tImpConn *BssConn; // tImpConn *BssConn;
tImpConn **bsplus; // tImpConn **bsplus;
tImpConn **bsplus_down; // tImpConn **bsplus_down;
/* /*
* ImpEvent structure definition * ImpEvent structure definition
* This stores the IMP event from BSS * This stores the IMP event from BSS
@@ -265,7 +265,7 @@ struct ImpEvent {
int severity; int severity;
}; };
typedef struct ImpEvent tImpEvent; typedef struct ImpEvent tImpEvent;
tImpEvent BssEvent; // tImpEvent BssEvent;
/* /*
* Use link list to maintain the queue of commands for each IMP connection * Use link list to maintain the queue of commands for each IMP connection
* A shared buffer(array) is used to store the commands to different BSS * A shared buffer(array) is used to store the commands to different BSS
@@ -282,8 +282,8 @@ struct queue { // A FIFO Queue
u32 TransId; u32 TransId;
bool available; bool available;
}; };
struct queue CmdBuffer[CMD_BUFFER_SIZE]; // struct queue CmdBuffer[CMD_BUFFER_SIZE];
int CmdBufferPtr=0; // int CmdBufferPtr=0;
/* /*
* Function declaration * Function declaration
*/ */