[libpri-commits] dvossel: branch dvossel/aoc_send r1572 - /team/dvossel/aoc_send/pri_aoc.c

SVN commits to the libpri project libpri-commits at lists.digium.com
Mon Apr 5 10:46:16 CDT 2010


Author: dvossel
Date: Mon Apr  5 10:46:14 2010
New Revision: 1572

URL: http://svnview.digium.com/svn/libpri?view=rev&rev=1572
Log:
fixes error in aoc response logic

Modified:
    team/dvossel/aoc_send/pri_aoc.c

Modified: team/dvossel/aoc_send/pri_aoc.c
URL: http://svnview.digium.com/svn/libpri/team/dvossel/aoc_send/pri_aoc.c?view=diff&rev=1572&r1=1571&r2=1572
==============================================================================
--- team/dvossel/aoc_send/pri_aoc.c (original)
+++ team/dvossel/aoc_send/pri_aoc.c Mon Apr  5 10:46:14 2010
@@ -1105,11 +1105,14 @@
 	struct pri_subcmd_aoc_request *aoc_request;
 	int errorcode;
 
-	if (!PRI_MASTER(ctrl)->aoc_support) {
+	if (!PRI_MASTER(ctrl)->aoc_support ||
+		(reason == APDU_CALLBACK_REASON_ERROR) ||
+		(reason == APDU_CALLBACK_REASON_CLEANUP)) {
 		return -1;
 	}
 
 	subcmd = q931_alloc_subcommand(ctrl);
+
 	if (!subcmd) {
 		return -1;
 	}
@@ -1119,7 +1122,7 @@
 	subcmd->cmd = PRI_SUBCMD_AOC_CHARGING_REQUEST_RESPONSE;
 
 	switch (reason) {
-	case APDU_CALLBACK_REASON_ERROR:
+	case APDU_CALLBACK_REASON_MSG_ERROR:
 		errorcode = msg->response.error->code;
 		switch (errorcode) {
 		case ROSE_ERROR_Gen_NotImplemented:




More information about the libpri-commits mailing list