ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/logging.C
(Generate patch)

Comparing rxvt-unicode/src/logging.C (file contents):
Revision 1.25 by root, Tue Jan 17 06:06:42 2006 UTC vs.
Revision 1.26 by ayin, Tue Jan 17 09:31:24 2006 UTC

223 */ 223 */
224void 224void
225rxvt_session::logout () 225rxvt_session::logout ()
226{ 226{
227#ifdef HAVE_STRUCT_UTMP 227#ifdef HAVE_STRUCT_UTMP
228 struct utmp *ut = &this->ut; 228 struct utmp *tmput, *ut = &this->ut;
229#endif 229#endif
230#ifdef HAVE_STRUCT_UTMPX 230#ifdef HAVE_STRUCT_UTMPX
231 struct utmpx *tmputx, *utx = &this->utx; 231 struct utmpx *tmputx, *utx = &this->utx;
232#endif 232#endif
233 233
235# ifdef HAVE_UTMP_PID 235# ifdef HAVE_UTMP_PID
236 memset (ut, 0, sizeof (struct utmp)); 236 memset (ut, 0, sizeof (struct utmp));
237 setutent (); 237 setutent ();
238 strncpy (ut->ut_id, this->ut_id, sizeof (ut->ut_id)); 238 strncpy (ut->ut_id, this->ut_id, sizeof (ut->ut_id));
239 ut->ut_type = USER_PROCESS; 239 ut->ut_type = USER_PROCESS;
240 {
241 struct utmp *tmput = getutid (ut);
242
243 if (tmput) /* position to entry in utmp file */ 240 if ((tmput = getutid (ut))) /* position to entry in utmp file */
244 ut = tmput; 241 ut = tmput;
245 }
246 ut->ut_type = DEAD_PROCESS; 242 ut->ut_type = DEAD_PROCESS;
247# else 243# else
248 memset (ut->ut_name, 0, sizeof (ut->ut_name)); 244 memset (ut->ut_name, 0, sizeof (ut->ut_name));
249# ifdef HAVE_UTMP_HOST 245# ifdef HAVE_UTMP_HOST
250 memset (ut->ut_host, 0, sizeof (ut->ut_host)); 246 memset (ut->ut_host, 0, sizeof (ut->ut_host));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines