From d6267d12d8bd945f219b3d2f7bf04060fe2d83bd Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Mon, 19 Jan 2015 11:10:04 +0100 Subject: sgsn: Add SGSN_ERROR_CAUSE_NONE and use it instead of 0 Currently an error_cause of 0 is being used to indicate normal operation. Albeit this is not a defined GMM cause, the value is not explicitly reserved. This commit adds the macro SGSN_ERROR_CAUSE_NONE and uses it for initialisation (instead of relying on talloc_zero) and comparisons. The value is set to -1 to be on the safe side. The VTY code is updated to set the error_cause when using the 'update-subscriber imsi IMSI update-location-result CAUSE' command. Sponsored-by: On-Waves ehf --- openbsc/include/openbsc/gprs_sgsn.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'openbsc/include/openbsc/gprs_sgsn.h') diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h index 25810ab3a..00cf5ccef 100644 --- a/openbsc/include/openbsc/gprs_sgsn.h +++ b/openbsc/include/openbsc/gprs_sgsn.h @@ -288,6 +288,8 @@ struct sgsn_subscriber_data { enum sgsn_subscriber_proc blocked_by; }; +#define SGSN_ERROR_CAUSE_NONE (-1) + #define LOGGSUBSCRP(level, subscr, fmt, args...) \ LOGP(DGPRS, level, "SUBSCR(%s) " fmt, \ (subscr) ? (subscr)->imsi : "---", \ -- cgit v1.2.3