[xiph-cvs] cvs commit: icecast/src stats.c

Jack Moffitt jack at xiph.org
Wed Feb 13 16:28:41 PST 2002



jack        02/02/13 16:28:41

  Modified:    src      stats.c
  Log:
  Shut down the stats_connection and stats_callback threads cleanly when
  stats_shutdown() is called.

Revision  Changes    Path
1.9       +5 -0      icecast/src/stats.c

Index: stats.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/stats.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- stats.c	2002/02/06 07:52:09	1.8
+++ stats.c	2002/02/14 00:28:41	1.9
@@ -413,6 +413,9 @@
                 thread_sleep(300000);
         }
 
+	/* wake the other threads so they can shut down cleanly */
+	thread_cond_broadcast(&_event_signal_cond);
+
         thread_exit(0);
 
         return NULL;
@@ -593,6 +596,7 @@
                 } else {
                         thread_mutex_unlock(&local_event_mutex);
                         thread_cond_wait(&_event_signal_cond);
+			if (!_stats_running) break;
                         continue;
                 }
                                
@@ -635,6 +639,7 @@
                 } else {
                         thread_mutex_unlock(&local_event_mutex);
                         thread_cond_wait(&_event_signal_cond);
+			if (!_stats_running) break;
                         continue;
                 }
                 

<p><p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list