y_socket: transfert kill to extern, y_nnn: debug leak mem

This commit is contained in:
2025-11-23 13:30:01 +01:00
parent f5309735d9
commit c60e41cf0f
7 changed files with 59 additions and 19 deletions
+7
View File
@@ -347,6 +347,10 @@ void* y_socket_handler_(void *arg){
}
else if(len_buf >7 && strncmp(buf, "update", 6)==0){
if(strncmp(buf+7,"kill",4)==0){
if(sock->var->extern_socket_handler){
sock->var->extern_socket_handler("kill",4,sock->var->extern_arg);
}
pthread_mutex_lock(sock->mut_go_on);
sock->go_on = 0;
pthread_mutex_unlock(sock->mut_go_on);
@@ -610,6 +614,9 @@ if(buf_len>6){
}else if(buf_len && strncmp(buf, "help", 4)==0){
usage_cmdl();
}else if(buf_len && strncmp(buf, "kill", 4)==0){
if(var->extern_socket_handler){
var->extern_socket_handler(buf,buf_len,var->extern_arg);
}
pthread_mutex_lock(argSock->mut_go_on);
argSock->go_on = 0;
pthread_mutex_unlock(argSock->mut_go_on);