diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-01-19 11:10:04 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-01-20 16:13:48 +0100 |
commit | d6267d12d8bd945f219b3d2f7bf04060fe2d83bd (patch) | |
tree | 99156a4e36f626b965c72d59476bae95dfc70a63 /openbsc/include/openbsc/gprs_sgsn.h | |
parent | 2585620857a3a6c17b17a65a3d9a863824b8e401 (diff) |
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
Diffstat (limited to 'openbsc/include/openbsc/gprs_sgsn.h')
-rw-r--r-- | openbsc/include/openbsc/gprs_sgsn.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 : "---", \ |