mirror of
				https://github.com/3proxy/3proxy.git
				synced 2025-11-04 15:52:39 +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);
 | 
						pthread_mutex_unlock(&log_mutex);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					unsigned char statbuf[8192];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void logsql(struct clientparam * param, const unsigned char *s) {
 | 
					void logsql(struct clientparam * param, const unsigned char *s) {
 | 
				
			||||||
	SQLRETURN ret;
 | 
						SQLRETURN ret;
 | 
				
			||||||
	int len;
 | 
						int len;
 | 
				
			||||||
@ -1409,35 +1411,35 @@ void logsql(struct clientparam * param, const unsigned char *s) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	if(param->nolog) return;
 | 
						if(param->nolog) return;
 | 
				
			||||||
	pthread_mutex_lock(&log_mutex);
 | 
						pthread_mutex_lock(&log_mutex);
 | 
				
			||||||
	len = dobuf(param, tmpbuf, s, (unsigned char *)"\'");
 | 
						len = dobuf(param, statbuf, s, (unsigned char *)"\'");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if(attempt > 5){
 | 
						if(attempt > 5){
 | 
				
			||||||
		time_t t;
 | 
							time_t t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		t = time(0);
 | 
							t = time(0);
 | 
				
			||||||
		if (t - attempt_time < 180){
 | 
							if (t - attempt_time < 180){
 | 
				
			||||||
			sqlerr((char *)tmpbuf);
 | 
								sqlerr((char *)statbuf);
 | 
				
			||||||
			return;
 | 
								return;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if(!hstmt){
 | 
						if(!hstmt){
 | 
				
			||||||
		if(!init_sql(sqlstring)) {
 | 
							if(!init_sql(sqlstring)) {
 | 
				
			||||||
			sqlerr((char *)tmpbuf);
 | 
								sqlerr((char *)statbuf);
 | 
				
			||||||
			return;
 | 
								return;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if(hstmt){
 | 
						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){
 | 
							if(ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO){
 | 
				
			||||||
			close_sql();
 | 
								close_sql();
 | 
				
			||||||
			if(!init_sql(sqlstring)){
 | 
								if(!init_sql(sqlstring)){
 | 
				
			||||||
				sqlerr((char *)tmpbuf);
 | 
									sqlerr((char *)statbuf);
 | 
				
			||||||
				return;
 | 
									return;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			if(hstmt) {
 | 
								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){
 | 
									if(ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO){
 | 
				
			||||||
					sqlerr((char *)tmpbuf);
 | 
										sqlerr((char *)statbuf);
 | 
				
			||||||
					return;
 | 
										return;
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				attempt = 0;
 | 
									attempt = 0;
 | 
				
			||||||
 | 
				
			|||||||
@ -311,7 +311,6 @@ struct datatype;
 | 
				
			|||||||
struct dictionary;
 | 
					struct dictionary;
 | 
				
			||||||
struct node;
 | 
					struct node;
 | 
				
			||||||
struct property;
 | 
					struct property;
 | 
				
			||||||
extern unsigned char tmpbuf[8192];
 | 
					 | 
				
			||||||
extern pthread_mutex_t config_mutex;
 | 
					extern pthread_mutex_t config_mutex;
 | 
				
			||||||
extern pthread_mutex_t bandlim_mutex;
 | 
					extern pthread_mutex_t bandlim_mutex;
 | 
				
			||||||
extern pthread_mutex_t connlim_mutex;
 | 
					extern pthread_mutex_t connlim_mutex;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user