Merge branch 'master' of http://git.komect.net/ISG/secogateway
This commit is contained in:
commit
e43238ff4c
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
#var.log_root = "/home/cmhi/secogateway/libs/files/lighttpd/log"
|
#var.log_root = "/home/cmhi/secogateway/libs/files/lighttpd/log"
|
||||||
var.server_root = "/home/cmhi/secogateway/libs/files/lighttpd"
|
var.server_root = "/usr/Product_usr/files/lighttpd"
|
||||||
#var.state_dir = "/home/cmhi/secogateway/libs/files/lighttpd"
|
#var.state_dir = "/home/cmhi/secogateway/libs/files/lighttpd"
|
||||||
#var.home_dir = "/home/cmhi/secogateway/libs/files/lighttpd"
|
#var.home_dir = "/home/cmhi/secogateway/libs/files/lighttpd"
|
||||||
#var.conf_dir = "/home/cmhi/secogateway/libs/files/lighttpd/config"
|
#var.conf_dir = "/home/cmhi/secogateway/libs/files/lighttpd/config"
|
||||||
|
|
|
@ -220,6 +220,7 @@ static handler_t judge_user_auth(server *srv, connection *con, void* p_d)
|
||||||
in_port_t serverport = 0;
|
in_port_t serverport = 0;
|
||||||
in_port_t clientport = 0;
|
in_port_t clientport = 0;
|
||||||
char str[INET_ADDRSTRLEN];
|
char str[INET_ADDRSTRLEN];
|
||||||
|
char dtr[INET_ADDRSTRLEN];
|
||||||
|
|
||||||
RESULT *uresult;
|
RESULT *uresult;
|
||||||
uresult = ( RESULT *)malloc(sizeof(RESULT));
|
uresult = ( RESULT *)malloc(sizeof(RESULT));
|
||||||
|
@ -230,7 +231,11 @@ static handler_t judge_user_auth(server *srv, connection *con, void* p_d)
|
||||||
log_error_write(srv, __FILE__, __LINE__, "s","test");
|
log_error_write(srv, __FILE__, __LINE__, "s","test");
|
||||||
|
|
||||||
get_local_peer_ip(con->fd, &serverip, &clientip, &serverport, &clientport);
|
get_local_peer_ip(con->fd, &serverip, &clientip, &serverport, &clientport);
|
||||||
log_error_write(srv, __FILE__, __LINE__, "sdd","test", clientip, clientport);
|
|
||||||
|
memset(dtr, 0, INET_ADDRSTRLEN);
|
||||||
|
inet_ntop(AF_INET, &clientip, dtr, sizeof(dtr));
|
||||||
|
log_error_write(srv, __FILE__, __LINE__, "ssd","test", dtr, clientport);
|
||||||
|
|
||||||
|
|
||||||
/*通过用户IP判断用户是否认证通过*/
|
/*通过用户IP判断用户是否认证通过*/
|
||||||
uinfo = ufind_user(clientip);
|
uinfo = ufind_user(clientip);
|
||||||
|
|
|
@ -8,9 +8,11 @@
|
||||||
#include "user_hashtable.h"
|
#include "user_hashtable.h"
|
||||||
#include "user_auth.h"
|
#include "user_auth.h"
|
||||||
#include <cjson/cJSON.h>
|
#include <cjson/cJSON.h>
|
||||||
|
#include "../../../Common/usermanager/ug_common.h"
|
||||||
|
|
||||||
static server* g_svr = NULL;
|
static server* g_svr = NULL;
|
||||||
extern USER_AUTH_LIST g_user_auth_ret_table[];
|
extern USER_AUTH_LIST g_user_auth_ret_table[];
|
||||||
|
extern USERCACHE *shm_userauth_table;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/*链表全局变量 */
|
/*链表全局变量 */
|
||||||
|
@ -220,14 +222,25 @@ void udelete_user(int user_ip)
|
||||||
|
|
||||||
if(NULL != pNode)
|
if(NULL != pNode)
|
||||||
{
|
{
|
||||||
/*查找用户ID,确认ID是否存在 */
|
/*查找用户ID,确认ID是否存在 */
|
||||||
check_id = g_user_auth_ret_table[pNode->auth_user.user_id].group_id;
|
check_id = shm_userauth_table[pNode->auth_user.user_id].authlist.group_id;
|
||||||
|
log_error_write(g_svr, __FILE__, __LINE__, "sd", "test", shm_userauth_table[pNode->auth_user.user_id].authlist.group_id);
|
||||||
|
log_error_write(g_svr, __FILE__, __LINE__, "sd", "test", check_id);
|
||||||
if(check_id != 0)
|
if(check_id != 0)
|
||||||
{
|
{
|
||||||
hlist_del(&pNode->hnode);
|
hlist_del(&pNode->hnode);
|
||||||
|
log_error_write(g_svr, __FILE__, __LINE__, "s", "test");
|
||||||
}
|
}
|
||||||
|
|
||||||
free(pNode);
|
free(pNode);
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
log_error_write(g_svr, __FILE__, __LINE__, "sdd", "test", pNode->auth_user.user_id, g_user_auth_ret_table[pNode->auth_user.user_id].group_id);
|
||||||
|
hlist_del(&pNode->hnode);
|
||||||
|
log_error_write(g_svr, __FILE__, __LINE__, "s", "test");
|
||||||
|
free(pNode);
|
||||||
|
free(pNode);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -271,6 +284,9 @@ int uprintf_users()
|
||||||
online_num++;
|
online_num++;
|
||||||
log_error_write(g_svr, __FILE__, __LINE__, "sd", "test", online_num);
|
log_error_write(g_svr, __FILE__, __LINE__, "sd", "test", online_num);
|
||||||
inet_ntop(AF_INET, (void *)&(pNode->auth_user.user_ip), str, USERNAME_SIZE);
|
inet_ntop(AF_INET, (void *)&(pNode->auth_user.user_ip), str, USERNAME_SIZE);
|
||||||
|
log_error_write(g_svr, __FILE__, __LINE__, "sssddddd", "test", str,pNode->auth_user.user_name, pNode->auth_user.user_id,
|
||||||
|
pNode->auth_user.group_id, pNode->auth_user.message_num,pNode->auth_user.byte_num, pNode->auth_user.online_time );
|
||||||
|
|
||||||
printf("[%s %s %d %d %ld %ld %ld]\n", str, pNode->auth_user.user_name, pNode->auth_user.user_id,
|
printf("[%s %s %d %d %ld %ld %ld]\n", str, pNode->auth_user.user_name, pNode->auth_user.user_id,
|
||||||
pNode->auth_user.group_id, pNode->auth_user.message_num,pNode->auth_user.byte_num, pNode->auth_user.online_time);
|
pNode->auth_user.group_id, pNode->auth_user.message_num,pNode->auth_user.byte_num, pNode->auth_user.online_time);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue