[svn-commits] rmudgett: branch group/ccss r1421 - /team/group/ccss/pri_facility.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Jan 15 17:07:52 CST 2010


Author: rmudgett
Date: Fri Jan 15 17:07:49 2010
New Revision: 1421

URL: http://svnview.digium.com/svn/libpri?view=rev&rev=1421
Log:
Demote unconditional pri_error() messages in response to APDU error and reject messages.

Modified:
    team/group/ccss/pri_facility.c

Modified: team/group/ccss/pri_facility.c
URL: http://svnview.digium.com/svn/libpri/team/group/ccss/pri_facility.c?view=diff&rev=1421&r1=1420&r2=1421
==============================================================================
--- team/group/ccss/pri_facility.c (original)
+++ team/group/ccss/pri_facility.c Fri Jan 15 17:07:49 2010
@@ -3285,12 +3285,14 @@
 	struct apdu_event *apdu;
 	struct apdu_msg_data msg;
 
-	/* Gripe to the user about getting rejected. */
-	pri_error(ctrl, "ROSE REJECT:\n");
-	if (reject->invoke_id_present) {
-		pri_error(ctrl, "\tINVOKE ID: %d\n", reject->invoke_id);
-	}
-	pri_error(ctrl, "\tPROBLEM: %s\n", rose_reject2str(reject->code));
+	if (ctrl->debug & PRI_DEBUG_APDU) {
+		/* Gripe to the user about getting rejected. */
+		pri_message(ctrl, "ROSE REJECT:\n");
+		if (reject->invoke_id_present) {
+			pri_message(ctrl, "\tINVOKE ID: %d\n", reject->invoke_id);
+		}
+		pri_message(ctrl, "\tPROBLEM: %s\n", rose_reject2str(reject->code));
+	}
 
 	switch (ctrl->switchtype) {
 	case PRI_SWITCH_DMS100:
@@ -3356,31 +3358,33 @@
 	struct apdu_event *apdu;
 	struct apdu_msg_data msg;
 
-	/* Gripe to the user about getting an error. */
-	pri_error(ctrl, "ROSE RETURN ERROR:\n");
-	switch (ctrl->switchtype) {
-	case PRI_SWITCH_DMS100:
-		switch (error->invoke_id) {
-		case ROSE_DMS100_RLT_OPERATION_IND:
-			dms100_operation = "RLT_OPERATION_IND";
-			break;
-		case ROSE_DMS100_RLT_THIRD_PARTY:
-			dms100_operation = "RLT_THIRD_PARTY";
-			break;
+	if (ctrl->debug & PRI_DEBUG_APDU) {
+		/* Gripe to the user about getting an error. */
+		pri_message(ctrl, "ROSE RETURN ERROR:\n");
+		switch (ctrl->switchtype) {
+		case PRI_SWITCH_DMS100:
+			switch (error->invoke_id) {
+			case ROSE_DMS100_RLT_OPERATION_IND:
+				dms100_operation = "RLT_OPERATION_IND";
+				break;
+			case ROSE_DMS100_RLT_THIRD_PARTY:
+				dms100_operation = "RLT_THIRD_PARTY";
+				break;
+			default:
+				dms100_operation = NULL;
+				break;
+			}
+			if (dms100_operation) {
+				pri_message(ctrl, "\tOPERATION: %s\n", dms100_operation);
+				break;
+			}
+			/* fall through */
 		default:
-			dms100_operation = NULL;
-			break;
-		}
-		if (dms100_operation) {
-			pri_error(ctrl, "\tOPERATION: %s\n", dms100_operation);
-			break;
-		}
-		/* fall through */
-	default:
-		pri_error(ctrl, "\tINVOKE ID: %d\n", error->invoke_id);
-		break;
-	}
-	pri_error(ctrl, "\tERROR: %s\n", rose_error2str(error->code));
+			pri_message(ctrl, "\tINVOKE ID: %d\n", error->invoke_id);
+			break;
+		}
+		pri_message(ctrl, "\tERROR: %s\n", rose_error2str(error->code));
+	}
 
 	switch (ctrl->switchtype) {
 	case PRI_SWITCH_DMS100:




More information about the svn-commits mailing list