[Freeswitch-svn] [commit] r8704 - freeswitch/trunk/src/mod/formats/mod_local_stream

Freeswitch SVN mikej at freeswitch.org
Wed May 28 00:50:52 EDT 2008


Author: mikej
Date: Wed May 28 00:50:51 2008
New Revision: 8704

Modified:
   freeswitch/trunk/src/mod/formats/mod_local_stream/mod_local_stream.c

Log:
don't try to open failed local_stream's (MODFORM-9)

Modified: freeswitch/trunk/src/mod/formats/mod_local_stream/mod_local_stream.c
==============================================================================
--- freeswitch/trunk/src/mod/formats/mod_local_stream/mod_local_stream.c	(original)
+++ freeswitch/trunk/src/mod/formats/mod_local_stream/mod_local_stream.c	Wed May 28 00:50:51 2008
@@ -115,6 +115,8 @@
 		skip = do_rand();
 	}
 
+	switch_core_hash_insert(globals.source_hash, source->name, source);
+
 	while (RUNNING) {
 		const char *fname;
 
@@ -229,6 +231,8 @@
 	}
 
   done:
+	switch_core_hash_delete(globals.source_hash, source->name);
+
 	switch_buffer_destroy(&audio_buffer);
 
 	if (fd > -1) {
@@ -431,8 +435,6 @@
 
 		source->samples = switch_samples_per_frame(source->rate, source->interval);
 
-		switch_core_hash_insert(globals.source_hash, source->name, source);
-
 		switch_mutex_init(&source->mutex, SWITCH_MUTEX_NESTED, source->pool);
 
 		switch_threadattr_create(&thd_attr, source->pool);



More information about the Freeswitch-svn mailing list