[Freeswitch-trunk] [commit] r12373 - in freeswitch/trunk/src: . include

FreeSWITCH SVN mrene at freeswitch.org
Tue Mar 3 09:14:59 PST 2009


Author: mrene
Date: Tue Mar  3 11:14:58 2009
New Revision: 12373

Log:
Revert 12369 since inserting NULL is the same as deleting in sqlite3

Modified:
   freeswitch/trunk/src/include/switch_channel.h
   freeswitch/trunk/src/switch_channel.c
   freeswitch/trunk/src/switch_ivr_async.c

Modified: freeswitch/trunk/src/include/switch_channel.h
==============================================================================
--- freeswitch/trunk/src/include/switch_channel.h	(original)
+++ freeswitch/trunk/src/include/switch_channel.h	Tue Mar  3 11:14:58 2009
@@ -410,14 +410,6 @@
 SWITCH_DECLARE(void *) switch_channel_get_private(switch_channel_t *channel, const char *key);
 
 /*!
-  \brief Unsets private from a given channel
-  \param channel channel to unsets data from
-  \param key your private data's unique keyname 
-  \return void SWITCH_STATUS_SUCCESS if data was unset
-*/
-SWITCH_DECLARE(switch_status_t) switch_channel_unset_private(switch_channel_t *channel, const char *key);
-
-/*!
   \brief Assign a name to a given channel
   \param channel channel to assign name to
   \param name name to assign

Modified: freeswitch/trunk/src/switch_channel.c
==============================================================================
--- freeswitch/trunk/src/switch_channel.c	(original)
+++ freeswitch/trunk/src/switch_channel.c	Tue Mar  3 11:14:58 2009
@@ -565,18 +565,6 @@
 	return SWITCH_STATUS_SUCCESS;
 }
 
-SWITCH_DECLARE(switch_status_t) switch_channel_unset_private(switch_channel_t *channel, const char *key)
-{
-	switch_status_t status;
-	switch_assert(channel != NULL);
-	
-	switch_mutex_lock(channel->profile_mutex);
-	status = switch_core_hash_delete(channel->private_hash, key);
-	switch_mutex_unlock(channel->profile_mutex);
-	
-	return status;
-}
-
 SWITCH_DECLARE(void *) switch_channel_get_private(switch_channel_t *channel, const char *key)
 {
 	void *val;

Modified: freeswitch/trunk/src/switch_ivr_async.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_async.c	(original)
+++ freeswitch/trunk/src/switch_ivr_async.c	Tue Mar  3 11:14:58 2009
@@ -188,7 +188,7 @@
 			switch_core_file_close(&dh->fh);
 
 			if (session && (channel = switch_core_session_get_channel(session))) {
-				switch_channel_unset_private(channel, dh->file);
+				switch_channel_set_private(channel, dh->file, NULL);
 			}
 		}
 		break;
@@ -269,7 +269,7 @@
 			switch_core_file_close(&dh->fh);
 
 			if (session && (channel = switch_core_session_get_channel(session))) {
-				switch_channel_unset_private(channel, dh->file);
+				switch_channel_set_private(channel, dh->file, NULL);
 			}
 		}
 		break;



More information about the Freeswitch-trunk mailing list