From 8bc7d6bebd4fcf8c95cb6d58da14404a5e46de91 Mon Sep 17 00:00:00 2001 From: Samba Release Account Date: Thu, 9 Jan 1997 18:02:17 +0000 Subject: Makefile: Changes to split Solaris into Solaris2.3 and previous, and 2.4 and after from Paul Eggert. Makefile: Added AMIGA changes from Rask Ingemann Lambertsen . charset.c: Patch for Western European Languages from Josef Hinteregger charset.h: Patch for Western European Languages from Josef Hinteregger clitar.c: Patch to re-sync after read fail from (lost contributor name, sorry). includes.h: Patch for AMIGA from Rask Ingemann Lambertsen includes.h: Patch for SunOS atexit by Jeremy (jra@cygnus.com) interface.c: Patch for AMIGA from Rask Ingemann Lambertsen kanji.h: Patch for Western European Languages from Josef Hinteregger locking.c: Patch to fix file locking from Jeremy (jra@cygnus.com) locking.c: Patch to add granularity of lock files to usec by Jeremy (jra@cygnus.com) pipes.c: Patch to fix file locking from Jeremy (jra@cygnus.com) proto.h: Patch to fix file locking from Jeremy (jra@cygnus.com) reply.c: Patch to fix file locking from Jeremy (jra@cygnus.com) server.c: Patch to fix file locking from Jeremy (jra@cygnus.com) server.c: Patch for FAST_SHARE_MODE fix from (lost contributor name, sorry). smb.h: Patch to fix file locking from Jeremy (jra@cygnus.com) smb.h: Patch to add granularity of lock files to usec by Jeremy (jra@cygnus.com) status.c: Patch to fix file locking from Jeremy (jra@cygnus.com) statuc.c: Patch to add granularity of lock files to usec by Jeremy (jra@cygnus.com) system.c: Patch for Western European Languages from Josef Hinteregger trans2.c: Patch to fix file locking from Jeremy (jra@cygnus.com) trans2.c: Patch to fix volume name reported to Win95 from Jeremy (jra@cygnus.com) util.c: Patch for Western European Languages from Josef Hinteregger util.c: Patch to fix client_name from continuously returning UNKNOWN (from various contributors). version.h: Update to 1.9.16p10. (This used to be commit 03d28fa32eb094affa33133ebe2602fdb70f6361) --- source3/utils/status.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'source3/utils/status.c') diff --git a/source3/utils/status.c b/source3/utils/status.c index ab61a4db89..69fbda5ea8 100644 --- a/source3/utils/status.c +++ b/source3/utils/status.c @@ -224,9 +224,9 @@ unsigned int Ucrit_IsActive = 0; /* added by OH */ dir = opendir(lp_lockdir()); if (!dir) return(0); while ((s=readdirname(dir))) { - char buf[16]; + char buf[20]; int pid,mode; - time_t t; + struct timeval t; int fd; pstring lname; int dev,inode; @@ -240,19 +240,20 @@ unsigned int Ucrit_IsActive = 0; /* added by OH */ fd = open(lname,O_RDONLY,0); if (fd < 0) continue; - if (read(fd,buf,16) != 16) continue; + if (read(fd,buf,20) != 20) continue; n = read(fd,fname,sizeof(fname)); fname[MAX(n,0)]=0; close(fd); - t = IVAL(buf,0); - mode = IVAL(buf,4); - pid = IVAL(buf,8); + t.tv_sec = IVAL(buf,4); + t.tv_usec = IVAL(buf,8); + mode = IVAL(buf,12); + pid = IVAL(buf,16); if ( !Ucrit_checkPid(pid) ) /* added by OH */ continue; - if (IVAL(buf,12) != LOCKING_VERSION || !process_exists(pid)) { + if (IVAL(buf,0) != LOCKING_VERSION || !process_exists(pid)) { if (unlink(lname)==0) printf("Deleted stale share file %s\n",s); continue; @@ -284,7 +285,7 @@ unsigned int Ucrit_IsActive = 0; /* added by OH */ case 1: printf("WRONLY "); break; case 2: printf("RDWR "); break; } - printf(" %s %s",fname,asctime(LocalTime(&t))); + printf(" %s %s",fname,asctime(LocalTime((time_t *)&t.tv_sec))); #if FAST_SHARE_MODES prev_p = scanner_p ; -- cgit