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_1_IP[16];
MYSQL omcDbConn,*omcDb_sock;
// by simon at 2024/10/19 begin ---
// MYSQL_RES *result;
// MYSQL_ROW row;
// char sqlstring[128];
extern MYSQL omcDbConn,*omcDb_sock;
extern MYSQL_RES *result;
extern MYSQL_ROW row;
extern char sqlstring[128];
// ---end
static int udp_sockfd;

View File

@@ -7,6 +7,23 @@
#include "includes.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
*
@@ -4491,7 +4508,7 @@ void setup_daemon(void);
/*************************************************
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;
Called By: //
Table Accessed: //
@@ -4528,7 +4545,7 @@ int main(int argc, char *argv[])
/*************************************************
Function: // onTimer
Description: // <20><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Description: // <20><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Calls: // ImpConnMultiplexer;
Called By: //
Table Accessed: //
@@ -4550,7 +4567,7 @@ void onTimer()
/*************************************************
Function: // setTimer
Description: // <20><><EFBFBD>ö<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Description: // <20><><EFBFBD>ö<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Calls: // onTimer;
Called By: //
Table Accessed: //

View File

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