sgsn: Add gsm0408_gprs_access_cancelled

This function is called to delete an established MM context
silently without invoking a detach procedure.

It is called when a subscriber is cancelled by the HLR. This
generally happens, when an MS has moved to another routing area and
has to use another SGSN.

Sponsored-by: On-Waves ehf
diff --git a/openbsc/src/gprs/sgsn_auth.c b/openbsc/src/gprs/sgsn_auth.c
index 071bdab..1f11948 100644
--- a/openbsc/src/gprs/sgsn_auth.c
+++ b/openbsc/src/gprs/sgsn_auth.c
@@ -184,7 +184,10 @@
 		gsm0408_gprs_access_granted(mmctx);
 		break;
 	case SGSN_AUTH_REJECTED:
-		gsm0408_gprs_access_denied(mmctx);
+		if (subscr && (subscr->flags & GPRS_SUBSCRIBER_CANCELLED) != 0)
+			gsm0408_gprs_access_cancelled(mmctx);
+		else
+			gsm0408_gprs_access_denied(mmctx);
 		break;
 	default:
 		break;