From 36153dc61aa15f9c3084c2824c51356fc4babadb Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Tue, 17 Mar 2015 10:21:17 +0100 Subject: bssgp: Handle BSSGP STATUS messages Currently incoming BSSGP STATUS messages are just logged and no other action is taken. This makes it impossible for higher layers to react to failures which are indicated by corresponding STATUS messages unless a timeout is triggered as a result of that failure later on. This commit adds a bssgp_rx_status() function and calls it on incoming STATUS messages. That function logs a message, increments the new BSSGP_CTR_STATUS counter if the bctx context exists and invokes an NM_STATUS status indication. The latter will allow the application to handle failures immediately. Since all STATUS messages should be handled, the function is already called in bssgp_rcvmsg and the message is no longer handled in (and will not reach) bssgp_rx_sign and bssgp_rx_ptp. Ticket: OW#1414 Sponsored-by: On-Waves ehf --- include/osmocom/gprs/gprs_bssgp.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/osmocom/gprs/gprs_bssgp.h b/include/osmocom/gprs/gprs_bssgp.h index f2292535..e24b563e 100644 --- a/include/osmocom/gprs/gprs_bssgp.h +++ b/include/osmocom/gprs/gprs_bssgp.h @@ -33,6 +33,7 @@ enum bssgp_prim { PRIM_NM_BVC_RESET, PRIM_NM_BVC_BLOCK, PRIM_NM_BVC_UNBLOCK, + PRIM_NM_STATUS, }; struct osmo_bssgp_prim { @@ -117,6 +118,7 @@ enum bssgp_ctr { BSSGP_CTR_BYTES_OUT, BSSGP_CTR_BLOCKED, BSSGP_CTR_DISCARDED, + BSSGP_CTR_STATUS, }; -- cgit v1.2.3