From ee48608bcffa78ba6aa83c6af078d45b74c90c8e Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Sun, 15 Feb 2004 23:19:39 +0000 Subject: [PATCH] Users with name like "test10" picked up inprogress files for "test1" as their own. git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@236 db0b04b0-f4d1-0310-9a6d-de3e77497b0e --- dgamelaunch.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dgamelaunch.c b/dgamelaunch.c index 6102175..05a8d4b 100644 --- a/dgamelaunch.c +++ b/dgamelaunch.c @@ -211,7 +211,13 @@ void ttyrec_getmaster () { (void) tcgetattr (0, &tt); - (void) ioctl (0, TIOCGWINSZ, (char *) &win); + if (-1 == ioctl (0, TIOCGWINSZ, (char *) &win)) + { + win.ws_row = 24; + win.ws_col = 80; + win.ws_xpixel = win.ws_col * 8; + win.ws_ypixel = win.ws_row * 8; + } #ifdef USE_OPENPTY if (openpty (&master, &slave, NULL, &tt, &win) == -1) #else @@ -1396,6 +1402,8 @@ purge_stale_locks (void) if (!colon) graceful_exit (201); + if (colon - dent->d_name != strlen(me->username)) + continue; if (strncmp (dent->d_name, me->username, colon - dent->d_name)) continue;