xup: pid logging, use log_message

ulab-next
Jay Sorg 11 years ago
parent b598e258a4
commit 97473e4f66

@ -19,6 +19,7 @@
*/ */
#include "xup.h" #include "xup.h"
#include "log.h"
#include <sys/ipc.h> #include <sys/ipc.h>
#include <sys/shm.h> #include <sys/shm.h>
@ -145,15 +146,16 @@ lib_mod_log_peer(struct mod *mod)
int uid; int uid;
int gid; int gid;
my_pid = g_get_pid(); my_pid = g_getpid();
if (g_sck_get_peer_cred(mod->sck, &pid, &uid, &gid) == 0) if (g_sck_get_peer_cred(mod->sck, &pid, &uid, &gid) == 0)
{ {
g_writeln("lib_mod_connect: xrdp pid %d", my_pid); log_message(LOG_LEVEL_INFO, "lib_mod_log_peer: xrdp pid %d connected "
g_writeln(" X11rdp pid %d, uid %d gid %d", pid, uid, gid); "to X11rdp pid %d", my_pid, pid);
} }
else else
{ {
g_writeln("lib_mod_connect: g_sck_get_peer_cred failed"); log_message(LOG_LEVEL_ERROR, "lib_mod_log_peer: g_sck_get_peer_cred "
"failed");
} }
return 0; return 0;
} }

Loading…
Cancel
Save