[svn-commits] dvossel: branch dvossel/generic_aoc r256217 - /team/dvossel/generic_aoc/chann...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Apr 5 12:14:22 CDT 2010


Author: dvossel
Date: Mon Apr  5 12:14:21 2010
New Revision: 256217

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=256217
Log:
update to match new libpri.h AOC_REQUEST enum values

Modified:
    team/dvossel/generic_aoc/channels/sig_pri.c

Modified: team/dvossel/generic_aoc/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/generic_aoc/channels/sig_pri.c?view=diff&rev=256217&r1=256216&r2=256217
==============================================================================
--- team/dvossel/generic_aoc/channels/sig_pri.c (original)
+++ team/dvossel/generic_aoc/channels/sig_pri.c Mon Apr  5 12:14:21 2010
@@ -2154,29 +2154,33 @@
  */
 static void sig_pri_aoc_request_from_pri(const struct pri_subcmd_aoc_request *aoc_request, struct sig_pri_pri *pri, q931_call *call)
 {
+	int request;
+
 	if (!aoc_request) {
 		return;
 	}
 
-	switch (aoc_request->charging_request) {
-	case PRI_AOC_REQUEST_S:
+	request = aoc_request->charging_request;
+
+	if (request & PRI_AOC_REQUEST_S) {
 		/* sending AOC-S has not been implemented yet */
 		pri_aoc_charging_request_response(pri->pri, call, PRI_AOC_REQUEST_RESPONSE_ERROR_NOT_IMPLEMENTED, aoc_request);
-		break;
-	case PRI_AOC_REQUEST_D:
+	}
+
+	if (request & PRI_AOC_REQUEST_D) {
 		if (pri->aoc_grant_flag & PRI_AOC_GRANT_D) {
 			pri_aoc_charging_request_response(pri->pri, call, PRI_AOC_REQUEST_RESPONSE_CHARGING_INFO_FOLLOWS, aoc_request);
 		} else {
 			pri_aoc_charging_request_response(pri->pri, call, PRI_AOC_REQUEST_RESPONSE_ERROR_NOT_AVAILABLE, aoc_request);
 		}
-		break;
-	case PRI_AOC_REQUEST_E:
+	}
+
+	if (request & PRI_AOC_REQUEST_E) {
 		if (pri->aoc_grant_flag & PRI_AOC_GRANT_E) {
 			pri_aoc_charging_request_response(pri->pri, call, PRI_AOC_REQUEST_RESPONSE_CHARGING_INFO_FOLLOWS, aoc_request);
 		} else {
 			pri_aoc_charging_request_response(pri->pri, call, PRI_AOC_REQUEST_RESPONSE_ERROR_NOT_AVAILABLE, aoc_request);
 		}
-		break;
 	}
 }
 #endif	/* defined(HAVE_PRI_AOC_EVENTS) */
@@ -5070,8 +5074,7 @@
 	}
 
 #if defined(HAVE_PRI_AOC_EVENTS)
-	if (ast_test_flag(&opts, OPT_AOC_REQUEST)
-		&& !ast_strlen_zero(opt_args[OPT_ARG_AOC_REQUEST])) {
+	if (ast_test_flag(&opts, OPT_AOC_REQUEST) && !ast_strlen_zero(opt_args[OPT_ARG_AOC_REQUEST])) {
 		if (strchr(opt_args[OPT_ARG_AOC_REQUEST], 's')) {
 			pri_sr_set_aoc_charging_request(sr, PRI_AOC_REQUEST_S);
 		}




More information about the svn-commits mailing list