]> skyeroc.xyz Git - dgamelaunch/commitdiff
Users with name like "test10" picked up inprogress files for "test1" as their
authorJilles Tjoelker <jilles@stack.nl>
Sun, 15 Feb 2004 23:19:39 +0000 (23:19 +0000)
committerJilles Tjoelker <jilles@stack.nl>
Sun, 15 Feb 2004 23:19:39 +0000 (23:19 +0000)
own.

git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@236 db0b04b0-f4d1-0310-9a6d-de3e77497b0e

dgamelaunch.c

index 61021756e9c0ebd5e1ffc498c86b795389d75155..05a8d4bd80eb98219b7dc88f39b0a1cdc53fbf22 100644 (file)
@@ -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;