some bugs
This commit is contained in:
parent
001a819a59
commit
aa186662ee
10
main.c
10
main.c
@ -46,7 +46,7 @@ struct notify_config
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct config cfg = {"","","",""};
|
struct config cfg = {"","","",""};
|
||||||
int loglevel = DEBUG;
|
int loglevel = INFO;
|
||||||
|
|
||||||
// return date in localized format
|
// return date in localized format
|
||||||
char * frtime(const time_t timet)
|
char * frtime(const time_t timet)
|
||||||
@ -635,14 +635,14 @@ int main()
|
|||||||
}
|
}
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
sprintf(strlog, "%s: %s Connecté depuis %s - %s %s\n", conn.date, conn.user, ip, conn.cmd, conn.cmdline);
|
sprintf(strlog, "%s: %s Connecté depuis %s - %s %s", conn.date, conn.user, ip, conn.cmd, conn.cmdline);
|
||||||
printlog(strlog, INFO, 0);
|
printlog(strlog, INFO, 0);
|
||||||
}
|
}
|
||||||
}else if (rinfo == -1)
|
}else if (rinfo == -1)
|
||||||
{
|
{
|
||||||
|
|
||||||
sprintf(strlog, "%i => 2 pids : en cours de connexion\n", conn.pid);
|
sprintf(strlog, "%i => 2 pids : en cours de connexion", conn.pid);
|
||||||
printlog(strlog, INFO, 0);
|
printlog(strlog, DEBUG, 0);
|
||||||
}
|
}
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
@ -656,7 +656,7 @@ int main()
|
|||||||
{
|
{
|
||||||
time( &now );
|
time( &now );
|
||||||
sprintf( date, "%s", frtime(now) );
|
sprintf( date, "%s", frtime(now) );
|
||||||
sprintf(strlog, "Session %d de %s terminée\n", connexions[i].pid, connexions[i].user );
|
sprintf(strlog, "Session %d de %s terminée", connexions[i].pid, connexions[i].user );
|
||||||
printlog(strlog, INFO, 0);
|
printlog(strlog, INFO, 0);
|
||||||
//sprintf(strlog, "%s: %s - pid %d - Connexion de %s terminée", connexions[i].date, cfg.hostname, connexions[i].pid, connexions[i].user);
|
//sprintf(strlog, "%s: %s - pid %d - Connexion de %s terminée", connexions[i].date, cfg.hostname, connexions[i].pid, connexions[i].user);
|
||||||
//printlog(strlog, INFO, 0);
|
//printlog(strlog, INFO, 0);
|
||||||
|
Reference in New Issue
Block a user