[asterisk-commits] trunk r20693 - /trunk/res/res_features.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sun Apr 16 15:02:32 MST 2006


Author: rizzo
Date: Sun Apr 16 17:02:30 2006
New Revision: 20693

URL: http://svn.digium.com/view/asterisk?rev=20693&view=rev
Log:
one more instance of stream_and_wait, and remove an extra
'error = 1' line put in by miustake


Modified:
    trunk/res/res_features.c

Modified: trunk/res/res_features.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_features.c?rev=20693&r1=20692&r2=20693&view=diff
==============================================================================
--- trunk/res/res_features.c (original)
+++ trunk/res/res_features.c Sun Apr 16 17:02:30 2006
@@ -1622,7 +1622,6 @@
 	struct parkeduser *pu, *pl=NULL;
 	struct ast_context *con;
 	int park;
-	int dres;
 	struct ast_bridge_config config;
 
 	if (!data) {
@@ -1682,7 +1681,6 @@
 			ast_indicate(peer, AST_CONTROL_UNHOLD);
 			if (parkedplay == 0) {
 				error = stream_and_wait(chan, courtesytone, chan->language, "");
-					error = 1;
 			} else if (parkedplay == 1) {
 				error = stream_and_wait(peer, courtesytone, chan->language, "");
 			} else if (parkedplay == 2) {
@@ -1729,13 +1727,8 @@
 		return res;
 	} else {
 		/* XXX Play a message XXX */
-		dres = ast_streamfile(chan, "pbx-invalidpark", chan->language);
-		if (!dres)
-	    		dres = ast_waitstream(chan, "");
-		else {
+		if (stream_and_wait(chan, "pbx-invalidpark", chan->language, ""))
 			ast_log(LOG_WARNING, "ast_streamfile of %s failed on %s\n", "pbx-invalidpark", chan->name);
-			dres = 0;
-		}
 		if (option_verbose > 2) 
 			ast_verbose(VERBOSE_PREFIX_3 "Channel %s tried to talk to nonexistent parked call %d\n", chan->name, park);
 		res = -1;
@@ -1809,9 +1802,9 @@
 
 		numparked++;
 	}
+	ast_mutex_unlock(&parking_lock);
 	ast_cli(fd, "%d parked call%s.\n", numparked, (numparked != 1) ? "s" : "");
 
-	ast_mutex_unlock(&parking_lock);
 
 	return RESULT_SUCCESS;
 }



More information about the asterisk-commits mailing list