mirror of
https://github.com/3proxy/3proxy.git
synced 2025-02-23 18:45:40 +08:00
rename static buffer
This commit is contained in:
parent
83441eebc7
commit
b76b3b49fa
16
src/auth.c
16
src/auth.c
@ -1402,6 +1402,8 @@ void sqlerr (char *buf){
|
||||
pthread_mutex_unlock(&log_mutex);
|
||||
}
|
||||
|
||||
unsigned char statbuf[8192];
|
||||
|
||||
void logsql(struct clientparam * param, const unsigned char *s) {
|
||||
SQLRETURN ret;
|
||||
int len;
|
||||
@ -1409,35 +1411,35 @@ void logsql(struct clientparam * param, const unsigned char *s) {
|
||||
|
||||
if(param->nolog) return;
|
||||
pthread_mutex_lock(&log_mutex);
|
||||
len = dobuf(param, tmpbuf, s, (unsigned char *)"\'");
|
||||
len = dobuf(param, statbuf, s, (unsigned char *)"\'");
|
||||
|
||||
if(attempt > 5){
|
||||
time_t t;
|
||||
|
||||
t = time(0);
|
||||
if (t - attempt_time < 180){
|
||||
sqlerr((char *)tmpbuf);
|
||||
sqlerr((char *)statbuf);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(!hstmt){
|
||||
if(!init_sql(sqlstring)) {
|
||||
sqlerr((char *)tmpbuf);
|
||||
sqlerr((char *)statbuf);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(hstmt){
|
||||
ret = SQLExecDirect(hstmt, (SQLCHAR *)tmpbuf, (SQLINTEGER)len);
|
||||
ret = SQLExecDirect(hstmt, (SQLCHAR *)statbuf, (SQLINTEGER)len);
|
||||
if(ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO){
|
||||
close_sql();
|
||||
if(!init_sql(sqlstring)){
|
||||
sqlerr((char *)tmpbuf);
|
||||
sqlerr((char *)statbuf);
|
||||
return;
|
||||
}
|
||||
if(hstmt) {
|
||||
ret = SQLExecDirect(hstmt, (SQLCHAR *)tmpbuf, (SQLINTEGER)len);
|
||||
ret = SQLExecDirect(hstmt, (SQLCHAR *)statbuf, (SQLINTEGER)len);
|
||||
if(ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO){
|
||||
sqlerr((char *)tmpbuf);
|
||||
sqlerr((char *)statbuf);
|
||||
return;
|
||||
}
|
||||
attempt = 0;
|
||||
|
@ -311,7 +311,6 @@ struct datatype;
|
||||
struct dictionary;
|
||||
struct node;
|
||||
struct property;
|
||||
extern unsigned char tmpbuf[8192];
|
||||
extern pthread_mutex_t config_mutex;
|
||||
extern pthread_mutex_t bandlim_mutex;
|
||||
extern pthread_mutex_t connlim_mutex;
|
||||
|
Loading…
Reference in New Issue
Block a user