*** empty log message ***
authorroot <root>
Tue, 17 Jan 2006 10:14:26 +0000 (10:14 +0000)
committerroot <root>
Tue, 17 Jan 2006 10:14:26 +0000 (10:14 +0000)
src/logging.C
src/main.C

index f63ef71..4c0fd9a 100644 (file)
@@ -33,9 +33,9 @@
 
 #include "../config.h"
 #include "rxvt.h"
-#include "logging.h"
+#include "ptytty.h"
 
-#ifdef UTMP_SUPPORT
+#if UTMP_SUPPORT
 
 #if HAVE_STRUCT_UTMP
 static int              rxvt_write_bsd_utmp              (int utmp_pos, struct utmp *wu);
@@ -57,11 +57,13 @@ static void             rxvt_update_lastlog              (const char *fname, con
  * make and write utmp and wtmp entries
  */
 void
-rxvt_session::login (const char *pty, int cmd_pid, bool login_shell, const char *hostname)
+rxvt_ptytty::login (int cmd_pid, bool login_shell, const char *hostname)
 {
   this->cmd_pid     = cmd_pid;
   this->login_shell = login_shell;
 
+  const char *pty = name;
+
 #ifdef HAVE_STRUCT_UTMP
   struct utmp *ut = &this->ut;
 #endif
@@ -222,7 +224,7 @@ rxvt_session::login (const char *pty, int cmd_pid, bool login_shell, const char
  * remove utmp and wtmp entries
  */
 void
-rxvt_session::logout ()
+rxvt_ptytty::logout ()
 {
 #ifdef HAVE_STRUCT_UTMP
   struct utmp *tmput, *ut = &this->ut;
index 01898c3..2c9bdd1 100644 (file)
@@ -726,9 +726,9 @@ rxvt_term::privileged_utmp (rxvt_privaction action)
   rxvt_privileges (RESTORE);
 
   if (action == SAVE)
-    session.login (pty.name, cmd_pid, OPTION (Opt_loginShell), rs[Rs_display_name]);
+    pty.login (cmd_pid, OPTION (Opt_loginShell), rs[Rs_display_name]);
   else
-    session.logout ();
+    pty.logout ();
 
   rxvt_privileges (IGNORE);
 }