diff src/noffle.c @ 127:3c71e28c8eef noffle

[svn] Release-1-0 mergedocs/NOTES
author bears
date Tue, 25 Jul 2000 13:14:54 +0100
parents d00adc26d77a
children a740dac296bc
line wrap: on
line diff
--- a/src/noffle.c	Tue Jul 25 13:12:50 2000 +0100
+++ b/src/noffle.c	Tue Jul 25 13:14:54 2000 +0100
@@ -10,7 +10,7 @@
   received for some seconds (to allow multiple clients connect at the same
   time).
 
-  $Id: noffle.c 176 2000-07-19 19:47:41Z enz $
+  $Id: noffle.c 183 2000-07-25 12:14:54Z bears $
 */
 
 #if HAVE_CONFIG_H
@@ -156,6 +156,12 @@
 {
     Str serv;
 
+    if ( ! Lock_getFetchLock( LOCK_NOWAIT ) )
+    {
+	Log_err( "Another 'noffle --fetch' is in progress" );
+	return;
+    }
+    
     Cfg_beginServEnum();
     while ( Cfg_nextServ( serv ) )
         if ( Fetch_init( serv ) )
@@ -174,6 +180,8 @@
 
             Fetch_close();
         }
+
+    Lock_releaseFetchLock();
 }
 
 static Bool
@@ -215,8 +223,6 @@
                 Client_getGrps();
             if ( noffle.queryDsc )
                 Client_getDsc();
-            if ( noffle.queryTimes )
-                Client_getCreationTimes();
             Fetch_close();
         }
 }
@@ -306,6 +312,9 @@
         Grp_create( name );
         Grp_setLocal( name );
 	printf( "New local group '%s' created.\n", name );
+	
+	snprintf( grp, MAXCHAR, "%s/groupinfo.lastupdate", Cfg_spoolDir() );
+	Utl_stamp( grp );
     }
 }
 
@@ -532,7 +541,6 @@
       " -p | --post                      Post article on stdin\n"
       " -q | --query groups              Get group list from server\n"
       " -q | --query desc                Get group descriptions from server\n"
-      " -q | --query times               Get group creation times from server\n"
       " -r | --server                    Run as server on stdin/stdout\n"
       " -R | --requested                 List articles marked for download\n"
       " -s | --subscribe-over <grp>      Add group to fetch list (overview)\n"
@@ -772,8 +780,6 @@
                 noffle.queryGrps = TRUE;
             else if ( strcmp( optarg, "desc" ) == 0 )
                 noffle.queryDsc = TRUE;
-            else if ( strcmp( optarg, "times" ) == 0 )
-                noffle.queryTimes = TRUE;
             else
             {
                 fprintf( stderr, "Unknown argument -q %s\n", optarg );