[asterisk-commits] qwell: branch qwell/hold_events r389726 - in /team/qwell/hold_events: channel...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri May 24 12:28:40 CDT 2013


Author: qwell
Date: Fri May 24 12:28:35 2013
New Revision: 389726

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=389726
Log:
Address review feedback.

Modified:
    team/qwell/hold_events/channels/chan_dahdi.c
    team/qwell/hold_events/channels/chan_sip.c
    team/qwell/hold_events/channels/chan_skinny.c
    team/qwell/hold_events/channels/sig_analog.c
    team/qwell/hold_events/main/channel.c
    team/qwell/hold_events/res/res_sip_sdp_rtp.c

Modified: team/qwell/hold_events/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/qwell/hold_events/channels/chan_dahdi.c?view=diff&rev=389726&r1=389725&r2=389726
==============================================================================
--- team/qwell/hold_events/channels/chan_dahdi.c (original)
+++ team/qwell/hold_events/channels/chan_dahdi.c Fri May 24 12:28:35 2013
@@ -6582,7 +6582,7 @@
 				/* This is actually part of a three way, placed on hold.  Place the third part
 				   on music on hold now */
 				if (p->subs[SUB_THREEWAY].owner) {
-					ast_queue_hold(p->subs[SUB_THREEWAY].owner, S_OR(p->mohsuggest, NULL));
+					ast_queue_hold(p->subs[SUB_THREEWAY].owner, p->mohsuggest);
 				}
 				p->subs[SUB_THREEWAY].inthreeway = 0;
 				/* Make it the call wait now */
@@ -6595,7 +6595,7 @@
 				/* The other party of the three way call is currently in a call-wait state.
 				   Start music on hold for them, and take the main guy out of the third call */
 				if (p->subs[SUB_CALLWAIT].owner) {
-					ast_queue_hold(p->subs[SUB_CALLWAIT].owner, S_OR(p->mohsuggest, NULL));
+					ast_queue_hold(p->subs[SUB_CALLWAIT].owner, p->mohsuggest);
 				}
 				p->subs[SUB_CALLWAIT].inthreeway = 0;
 			}
@@ -8686,10 +8686,10 @@
 				p->cid_suppress_expire = 0;
 				/* Start music on hold if appropriate */
 				if (!p->subs[SUB_CALLWAIT].inthreeway) {
-					ast_queue_hold(p->subs[SUB_CALLWAIT].owner, S_OR(p->mohsuggest, NULL));
+					ast_queue_hold(p->subs[SUB_CALLWAIT].owner, p->mohsuggest);
 				}
 				p->subs[SUB_CALLWAIT].needhold = 1;
-				ast_queue_hold(p->subs[SUB_REAL].owner, S_OR(p->mohsuggest, NULL));
+				ast_queue_hold(p->subs[SUB_REAL].owner, p->mohsuggest);
 				p->subs[SUB_REAL].needunhold = 1;
 			} else if (!p->subs[SUB_THREEWAY].owner) {
 				if (!p->threewaycalling) {
@@ -8767,7 +8767,7 @@
 						ast_verb(3, "Started three way call on channel %d\n", p->channel);
 
 						/* Start music on hold */
-						ast_queue_hold(p->subs[SUB_THREEWAY].owner, S_OR(p->mohsuggest, NULL));
+						ast_queue_hold(p->subs[SUB_THREEWAY].owner, p->mohsuggest);
 						p->subs[SUB_THREEWAY].needhold = 1;
 					}
 					ast_callid_threadstorage_auto_clean(callid, callid_created);

Modified: team/qwell/hold_events/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/qwell/hold_events/channels/chan_sip.c?view=diff&rev=389726&r1=389725&r2=389726
==============================================================================
--- team/qwell/hold_events/channels/chan_sip.c (original)
+++ team/qwell/hold_events/channels/chan_sip.c Fri May 24 12:28:35 2013
@@ -10795,7 +10795,7 @@
 		change_hold_state(p, req, FALSE, sendonly);
 	} else if ((sockaddr_is_null_or_any(sa) && sockaddr_is_null_or_any(vsa) && sockaddr_is_null_or_any(tsa) && sockaddr_is_null_or_any(isa)) || (sendonly && sendonly != -1)) {
 		if (!ast_test_flag(&p->flags[2], SIP_PAGE3_DISCARD_REMOTE_HOLD_RETRIEVAL)) {
-			ast_queue_hold(p->owner, S_OR(p->mohsuggest, NULL));
+			ast_queue_hold(p->owner, p->mohsuggest);
 		}
 		if (sendonly)
 			ast_rtp_instance_stop(p->rtp);

Modified: team/qwell/hold_events/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/team/qwell/hold_events/channels/chan_skinny.c?view=diff&rev=389726&r1=389725&r2=389726
==============================================================================
--- team/qwell/hold_events/channels/chan_skinny.c (original)
+++ team/qwell/hold_events/channels/chan_skinny.c Fri May 24 12:28:35 2013
@@ -5690,7 +5690,7 @@
 
 			sub->substate = SUBSTATE_HOLD;
 
-			ast_queue_hold(sub->owner, S_OR(l->mohsuggest, NULL));
+			ast_queue_hold(sub->owner, l->mohsuggest);
 
 			return;
 		default:
@@ -5950,7 +5950,7 @@
 			ast_log(LOG_WARNING, "Cannot set substate to SUBSTATE_HOLD from %s (on call-%d)\n", substate2str(sub->substate), sub->callid);
 			return;
 		}
-		ast_queue_hold(sub->owner, S_OR(l->mohsuggest, NULL));
+		ast_queue_hold(sub->owner, l->mohsuggest);
 
 		transmit_activatecallplane(d, l);
 		transmit_closereceivechannel(d, sub);

Modified: team/qwell/hold_events/channels/sig_analog.c
URL: http://svnview.digium.com/svn/asterisk/team/qwell/hold_events/channels/sig_analog.c?view=diff&rev=389726&r1=389725&r2=389726
==============================================================================
--- team/qwell/hold_events/channels/sig_analog.c (original)
+++ team/qwell/hold_events/channels/sig_analog.c Fri May 24 12:28:35 2013
@@ -1382,7 +1382,7 @@
 				/* This is actually part of a three way, placed on hold.  Place the third part
 				   on music on hold now */
 				if (p->subs[ANALOG_SUB_THREEWAY].owner) {
-					ast_queue_hold(p->subs[ANALOG_SUB_THREEWAY].owner, S_OR(p->mohsuggest, NULL));
+					ast_queue_hold(p->subs[ANALOG_SUB_THREEWAY].owner, p->mohsuggest);
 				}
 				analog_set_inthreeway(p, ANALOG_SUB_THREEWAY, 0);
 				/* Make it the call wait now */
@@ -1404,7 +1404,7 @@
 				   Start music on hold for them, and take the main guy out of the third call */
 				analog_set_inthreeway(p, ANALOG_SUB_CALLWAIT, 0);
 				if (p->subs[ANALOG_SUB_CALLWAIT].owner) {
-					ast_queue_hold(p->subs[ANALOG_SUB_CALLWAIT].owner, S_OR(p->mohsuggest, NULL));
+					ast_queue_hold(p->subs[ANALOG_SUB_CALLWAIT].owner, p->mohsuggest);
 				}
 			}
 			if (p->subs[ANALOG_SUB_CALLWAIT].owner) {
@@ -3179,9 +3179,9 @@
 
 				/* Start music on hold if appropriate */
 				if (!p->subs[ANALOG_SUB_CALLWAIT].inthreeway) {
-					ast_queue_hold(p->subs[ANALOG_SUB_CALLWAIT].owner, S_OR(p->mohsuggest, NULL));
-				}
-				ast_queue_hold(p->subs[ANALOG_SUB_REAL].owner, S_OR(p->mohsuggest, NULL));
+					ast_queue_hold(p->subs[ANALOG_SUB_CALLWAIT].owner, p->mohsuggest);
+				}
+				ast_queue_hold(p->subs[ANALOG_SUB_REAL].owner, p->mohsuggest);
 				ast_queue_unhold(p->subs[ANALOG_SUB_REAL].owner);
 
 				/* Unlock the call-waiting call that we swapped to real-call. */
@@ -3274,7 +3274,7 @@
 						ast_verb(3, "Started three way call on channel %d\n", p->channel);
 
 						/* Start music on hold */
-						ast_queue_hold(p->subs[ANALOG_SUB_THREEWAY].owner, S_OR(p->mohsuggest, NULL));
+						ast_queue_hold(p->subs[ANALOG_SUB_THREEWAY].owner, p->mohsuggest);
 					}
 					ast_callid_threadstorage_auto_clean(callid, callid_created);
 				}

Modified: team/qwell/hold_events/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/team/qwell/hold_events/main/channel.c?view=diff&rev=389726&r1=389725&r2=389726
==============================================================================
--- team/qwell/hold_events/main/channel.c (original)
+++ team/qwell/hold_events/main/channel.c Fri May 24 12:28:35 2013
@@ -1407,7 +1407,6 @@
 	return res;
 }
 
-/*! \brief Queue a hold frame for channel */
 int ast_queue_hold(struct ast_channel *chan, const char *musicclass)
 {
 	RAII_VAR(struct ast_json *, blob, NULL, ast_json_unref);
@@ -1429,7 +1428,6 @@
 	return res;
 }
 
-/*! \brief Queue a unhold frame for channel */
 int ast_queue_unhold(struct ast_channel *chan)
 {
 	RAII_VAR(struct stasis_message *, message, NULL, ao2_cleanup);

Modified: team/qwell/hold_events/res/res_sip_sdp_rtp.c
URL: http://svnview.digium.com/svn/asterisk/team/qwell/hold_events/res/res_sip_sdp_rtp.c?view=diff&rev=389726&r1=389725&r2=389726
==============================================================================
--- team/qwell/hold_events/res/res_sip_sdp_rtp.c (original)
+++ team/qwell/hold_events/res/res_sip_sdp_rtp.c Fri May 24 12:28:35 2013
@@ -705,7 +705,7 @@
 		   ast_sockaddr_is_any(addrs) ||
 		   pjmedia_sdp_media_find_attr2(remote_stream, "sendonly", NULL)) {
 		/* The remote side has put us on hold */
-		ast_queue_hold(session->channel, S_OR(session->endpoint->mohsuggest, NULL));
+		ast_queue_hold(session->channel, session->endpoint->mohsuggest);
 		ast_rtp_instance_stop(session_media->rtp);
 		ast_queue_frame(session->channel, &ast_null_frame);
 		session_media->held = 1;




More information about the asterisk-commits mailing list