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

Ed oddsock at xiph.org
Thu Dec 4 08:25:28 PST 2003



oddsock     03/12/04 11:25:28

  Modified:    src      stats.c
  Log:
  Remove stats_callback() which is only used by the win32 UI...The stats gathering done by the UI has been completely rewritten to eliminate some reported instability.

Revision  Changes    Path
1.30      +0 -50     icecast/src/stats.c

Index: stats.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/stats.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- stats.c	31 Oct 2003 19:21:00 -0000	1.29
+++ stats.c	4 Dec 2003 16:25:28 -0000	1.30
@@ -657,56 +657,6 @@
     return NULL;
 }
 
-/* this function is primarily to support gui code needing to get stats updates
-** create a thread with this as the start proc with an arg of the callback function
-** on each stats event the callback will be called with the event
-** and the callback is responsible for copying the data if it needs it after returning
-*/
-void *stats_callback(void *arg)
-{
-    void (*callback)(stats_event_t *event);
-
-    stats_event_t *local_event_queue = NULL;
-    mutex_t local_event_mutex;
-
-    stats_event_t *event;
-
-    callback = arg;
-
-    thread_mutex_lock(&_stats_mutex);
-    _stats_threads++;
-    thread_mutex_unlock(&_stats_mutex);
-
-    thread_mutex_create(&local_event_mutex);
-
-    _atomic_get_and_register(&local_event_queue, &local_event_mutex);
-
-    while (_stats_running) {
-        thread_mutex_lock(&local_event_mutex);
-        event = _get_event_from_queue(&local_event_queue);
-        if (event != NULL) {
-            callback(event);
-            _free_event(event);
-        } else {
-            thread_mutex_unlock(&local_event_mutex);
-            thread_cond_wait(&_event_signal_cond);
-            continue;
-        }
-        
-        thread_mutex_unlock(&local_event_mutex);
-    }
-
-    thread_mutex_destroy(&local_event_mutex);
-
-    thread_mutex_lock(&_stats_mutex);
-    _stats_threads--;
-    thread_mutex_unlock(&_stats_mutex);
-
-    thread_exit(0);
-
-    return NULL;
-}
-
 typedef struct _source_xml_tag {
     char *mount;
     xmlNodePtr node;

<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