From patchwork Thu Jul 9 19:02:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max X-Patchwork-Id: 493523 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.osmocom.org (unknown [IPv6:2a01:4f8:191:444b::2:7]) by ozlabs.org (Postfix) with ESMTP id C908E140D15 for ; Fri, 10 Jul 2015 05:12:58 +1000 (AEST) Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by lists.osmocom.org (Postfix) with ESMTP id A76267650; Thu, 9 Jul 2015 19:12:57 +0000 (UTC) X-Original-To: openbsc@lists.osmocom.org Delivered-To: openbsc@lists.osmocom.org Received: from hylle06.itea.ntnu.no (hylle06.itea.ntnu.no [129.241.56.235]) by lists.osmocom.org (Postfix) with ESMTP id D9A537636 for ; Thu, 9 Jul 2015 19:12:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hylle06.itea.ntnu.no (Postfix) with ESMTP id 0D8506632AC for ; Thu, 9 Jul 2015 21:03:12 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at hylle06.itea.ntnu.no Received: from alumnimail01.it.ntnu.no (unknown [IPv6:2001:700:300:4::54]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hylle06.itea.ntnu.no (Postfix) with ESMTPS id 9D76A66319D for ; Thu, 9 Jul 2015 21:03:11 +0200 (CEST) Received: from localhost (dslb-094-223-143-244.094.223.pools.vodafone-ip.de [94.223.143.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: suraev) by alumnimail01.it.ntnu.no (Postfix) with ESMTPSA id 5604655260 for ; Thu, 9 Jul 2015 21:03:11 +0200 (CEST) From: Max To: openbsc@lists.osmocom.org Subject: [PATCH 4/4] SS: Return Error instead of Reject for unprovisioned service Date: Thu, 9 Jul 2015 21:02:24 +0200 Message-Id: <1436468544-20989-4-git-send-email-max.suraev@fairwaves.co> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1436468544-20989-1-git-send-email-max.suraev@fairwaves.co> References: <1436468544-20989-1-git-send-email-max.suraev@fairwaves.co> X-BeenThere: openbsc@lists.osmocom.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Development of the OpenBSC GSM base station controller List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openbsc-bounces@lists.osmocom.org Sender: "OpenBSC" Signed-off-by: Max --- openbsc/src/libmsc/ss.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/openbsc/src/libmsc/ss.c b/openbsc/src/libmsc/ss.c index 44a01ec..4eabe1a 100644 --- a/openbsc/src/libmsc/ss.c +++ b/openbsc/src/libmsc/ss.c @@ -125,9 +125,9 @@ static int change_ss_activation(struct gsm_subscriber_connection *conn, uint8_t if(rc < 0 || !(ss_status & GSM0902_SS_STATUS_P_BIT)) { DEBUGP(DMM, "SS 0x%02X not provisioned\n", req->ss_code); - return gsm0480_send_ss_reject(conn, req, - GSM_0480_PROBLEM_CODE_TAG_INVOKE, - GSM_0480_INVOKE_PROB_CODE_UNRECOGNISED_OPERATION); + return gsm0480_send_ss_return_error(conn, req, + GSM0480_ERR_CODE_SS_SUBSCRIPTION_VIOLATION, + NULL); } ss_status &= ~GSM0902_SS_STATUS_A_BIT; @@ -160,9 +160,9 @@ static int interrogate_ss(struct gsm_subscriber_connection *conn, const struct s if(rc < 0 || !(ss_status & GSM0902_SS_STATUS_P_BIT)) { DEBUGP(DMM, "SS 0x%02X not provisioned\n", req->ss_code); - return gsm0480_send_ss_reject(conn, req, - GSM_0480_PROBLEM_CODE_TAG_INVOKE, - GSM_0480_INVOKE_PROB_CODE_UNRECOGNISED_OPERATION); + return gsm0480_send_ss_return_error(conn, req, + GSM0480_ERR_CODE_SS_SUBSCRIPTION_VIOLATION, + NULL); } msg = gsm48_msgb_alloc();