Change in libosmocore[master]: gprs_ns2: move sns_event into internal.h to direct emit events

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

lynxis lazus gerrit-no-reply at lists.osmocom.org
Fri Aug 6 20:18:43 UTC 2021


lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/25144 )


Change subject: gprs_ns2: move sns_event into internal.h to direct emit events
......................................................................

gprs_ns2: move sns_event into internal.h to direct emit events

Creating just a proxy function seems more overhead instead of calling it direct.

Change-Id: I8e3fae4367c112b5a71bffb33c302d903855cddc
---
M src/gb/gprs_ns2_internal.h
M src/gb/gprs_ns2_sns.c
M src/gb/gprs_ns_sns.c
3 files changed, 18 insertions(+), 18 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/44/25144/1

diff --git a/src/gb/gprs_ns2_internal.h b/src/gb/gprs_ns2_internal.h
index 95efbae..fb84651 100644
--- a/src/gb/gprs_ns2_internal.h
+++ b/src/gb/gprs_ns2_internal.h
@@ -320,6 +320,23 @@
 	void (*free_bind)(struct gprs_ns2_vc_bind *driver);
 };
 
+enum gprs_ns2_sns_event {
+	GPRS_SNS_EV_REQ_SELECT_ENDPOINT,	/*!< Select a SNS endpoint from the list */
+	GPRS_SNS_EV_RX_SIZE,
+	GPRS_SNS_EV_RX_SIZE_ACK,
+	GPRS_SNS_EV_RX_CONFIG,
+	GPRS_SNS_EV_RX_CONFIG_END,		/*!< SNS-CONFIG with end flag received */
+	GPRS_SNS_EV_RX_CONFIG_ACK,
+	GPRS_SNS_EV_RX_ADD,
+	GPRS_SNS_EV_RX_DELETE,
+	GPRS_SNS_EV_RX_CHANGE_WEIGHT,
+	GPRS_SNS_EV_RX_ACK,			/*!< Rx of SNS-ACK (response to ADD/DELETE/CHG_WEIGHT */
+	GPRS_SNS_EV_REQ_NO_NSVC,		/*!< no more NS-VC remaining (all dead) */
+	GPRS_SNS_EV_REQ_NSVC_ALIVE,		/*!< a NS-VC became alive */
+	GPRS_SNS_EV_REQ_ADD_BIND,		/*!< add a new local bind to this NSE */
+	GPRS_SNS_EV_REQ_DELETE_BIND,		/*!< remove a local bind from this NSE */
+};
+
 enum ns2_cs ns2_create_vc(struct gprs_ns2_vc_bind *bind,
 			       struct msgb *msg,
 			       const struct osmo_sockaddr *remote,
diff --git a/src/gb/gprs_ns2_sns.c b/src/gb/gprs_ns2_sns.c
index a9ace5f..b856eab 100644
--- a/src/gb/gprs_ns2_sns.c
+++ b/src/gb/gprs_ns2_sns.c
@@ -72,23 +72,6 @@
 	GPRS_SNS_ST_SGSN_WAIT_CONFIG_ACK,	/* !< SGSN role: Wait for CONFIG-ACK from BSS */
 };
 
-enum gprs_sns_event {
-	GPRS_SNS_EV_REQ_SELECT_ENDPOINT,	/*!< Select a SNS endpoint from the list */
-	GPRS_SNS_EV_RX_SIZE,
-	GPRS_SNS_EV_RX_SIZE_ACK,
-	GPRS_SNS_EV_RX_CONFIG,
-	GPRS_SNS_EV_RX_CONFIG_END,		/*!< SNS-CONFIG with end flag received */
-	GPRS_SNS_EV_RX_CONFIG_ACK,
-	GPRS_SNS_EV_RX_ADD,
-	GPRS_SNS_EV_RX_DELETE,
-	GPRS_SNS_EV_RX_CHANGE_WEIGHT,
-	GPRS_SNS_EV_RX_ACK,			/*!< Rx of SNS-ACK (response to ADD/DELETE/CHG_WEIGHT */
-	GPRS_SNS_EV_REQ_NO_NSVC,		/*!< no more NS-VC remaining (all dead) */
-	GPRS_SNS_EV_REQ_NSVC_ALIVE,		/*!< a NS-VC became alive */
-	GPRS_SNS_EV_REQ_ADD_BIND,		/*!< add a new local bind to this NSE */
-	GPRS_SNS_EV_REQ_DELETE_BIND,		/*!< remove a local bind from this NSE */
-};
-
 static const struct value_string gprs_sns_event_names[] = {
 	{ GPRS_SNS_EV_REQ_SELECT_ENDPOINT,	"REQ_SELECT_ENDPOINT" },
 	{ GPRS_SNS_EV_RX_SIZE,			"RX_SIZE" },
diff --git a/src/gb/gprs_ns_sns.c b/src/gb/gprs_ns_sns.c
index aa8b121..93ebf9a 100644
--- a/src/gb/gprs_ns_sns.c
+++ b/src/gb/gprs_ns_sns.c
@@ -273,7 +273,7 @@
 	GPRS_SNS_ST_CONFIGURED,
 };
 
-enum gprs_sns_event {
+enum gprs_ns2_sns_event {
 	GPRS_SNS_EV_START,
 	GPRS_SNS_EV_SIZE,
 	GPRS_SNS_EV_SIZE_ACK,

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/25144
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I8e3fae4367c112b5a71bffb33c302d903855cddc
Gerrit-Change-Number: 25144
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210806/770d8d54/attachment.htm>


More information about the gerrit-log mailing list