changeset 78201:f85d926dbc61

(current_lock_owner): Allow for @ sign in username.
author Jason Rumney <jasonr@gnu.org>
date Mon, 23 Jul 2007 22:35:05 +0000
parents ece6179ee893
children 89fdf8885a69
files src/filelock.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/filelock.c	Mon Jul 23 21:49:42 2007 +0000
+++ b/src/filelock.c	Mon Jul 23 22:35:05 2007 +0000
@@ -468,8 +468,8 @@
     }
 
   /* Parse USER@HOST.PID:BOOT_TIME.  If can't parse, return -1.  */
-  /* The USER is everything before the first @.  */
-  at = index (lfinfo, '@');
+  /* The USER is everything before the last @.  */
+  at = rindex (lfinfo, '@');
   dot = rindex (lfinfo, '.');
   if (!at || !dot)
     {