Change in osmo-bsc[master]: CTRL: determine MSC connection status from RESET-ACK, not AS_ACTIVE

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/.

neels gerrit-no-reply at lists.osmocom.org
Tue May 26 23:57:08 UTC 2020


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/18501 )


Change subject: CTRL: determine MSC connection status from RESET-ACK, not AS_ACTIVE
......................................................................

CTRL: determine MSC connection status from RESET-ACK, not AS_ACTIVE

Change-Id: I264ba6a72ea93297cfbc99602eccfbf4a890f703
---
M src/osmo-bsc/osmo_bsc_ctrl.c
1 file changed, 4 insertions(+), 12 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/01/18501/1

diff --git a/src/osmo-bsc/osmo_bsc_ctrl.c b/src/osmo-bsc/osmo_bsc_ctrl.c
index 12b2f4d..a787962 100644
--- a/src/osmo-bsc/osmo_bsc_ctrl.c
+++ b/src/osmo-bsc/osmo_bsc_ctrl.c
@@ -26,6 +26,7 @@
 #include <osmocom/bsc/osmo_bsc_rf.h>
 #include <osmocom/bsc/bsc_msc_data.h>
 #include <osmocom/bsc/signal.h>
+#include <osmocom/bsc/a_reset.h>
 
 #include <osmocom/core/linuxlist.h>
 #include <osmocom/core/signal.h>
@@ -179,24 +180,15 @@
 static int get_msc_connection_status(struct ctrl_cmd *cmd, void *data)
 {
 	struct bsc_msc_data *msc = (struct bsc_msc_data *)cmd->node;
-	struct osmo_ss7_as *as;
-	const char *as_state_name;
 
 	if (msc == NULL) {
 		cmd->reply = "msc not found";
 		return CTRL_CMD_ERROR;
 	}
-	as = msc_get_ss7_as(msc);
-	if (!as) {
-		cmd->reply = "AS not found for MSC";
-		return CTRL_CMD_ERROR;
-	}
-
-	as_state_name = osmo_fsm_inst_state_name(as->fi);
-	if (!strcmp(as_state_name, "AS_ACTIVE"))
-		cmd->reply = "connected";
-	else
+	if (a_reset_conn_ready(msc))
 		cmd->reply = "disconnected";
+	else
+		cmd->reply = "connected";
 	return CTRL_CMD_REPLY;
 }
 

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I264ba6a72ea93297cfbc99602eccfbf4a890f703
Gerrit-Change-Number: 18501
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200526/c420368a/attachment.htm>


More information about the gerrit-log mailing list