osmo-bsc[master]: Rename osmo_fsm to avoid illegal space in name + more meanin...

2017-10-25 Thread Pau Espin Pedrol

Patch Set 2:

Please, if it applies, remember to send the same patch against openbsc.git

-- 
To view, visit https://gerrit.osmocom.org/4403
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I1b44d26cebc4a47094d7b8b3983e5737b88bf003
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


[MERGED] osmo-bsc[master]: Rename osmo_fsm to avoid illegal space in name + more meanin...

2017-10-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: Rename osmo_fsm to avoid illegal space in name + more 
meaningful name
..


Rename osmo_fsm to avoid illegal space in name + more meaningful name

A FSM doesn't need "FSM" in its name, as it is obvious that it is a
FSM.  Also, having two that are called RESET is confusing, so let's
try to come up with better names.

Also, after Change-Id I9ef59432f43a3cdb94e4cbb0c44ac3f9b2aac0f2 in
libosmocore, we now enforce that no FSM identifiers contain spaces
or other illegal characters.

Change-Id: I1b44d26cebc4a47094d7b8b3983e5737b88bf003
---
M src/libcommon-cs/a_reset.c
M src/osmo-bsc/osmo_bsc_reset.c
2 files changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/libcommon-cs/a_reset.c b/src/libcommon-cs/a_reset.c
index c40bc41..f08d813 100644
--- a/src/libcommon-cs/a_reset.c
+++ b/src/libcommon-cs/a_reset.c
@@ -124,7 +124,7 @@
 
 /* State machine definition */
 static struct osmo_fsm fsm = {
-   .name = "FSM RESET",
+   .name = "A-RESET",
.states = fsm_states,
.num_states = ARRAY_SIZE(fsm_states),
.log_subsys = DMSC,
@@ -149,7 +149,7 @@
reset->cb = cb;
strncpy(reset->name, name, sizeof(reset->name));
reset->conn_loss_counter = 0;
-   reset->fsm = osmo_fsm_inst_alloc(, NULL, NULL, LOGL_DEBUG, "FSM 
RESET INST");
+   reset->fsm = osmo_fsm_inst_alloc(, NULL, NULL, LOGL_DEBUG, NULL);
OSMO_ASSERT(reset->fsm);
reset->fsm->priv = reset;
LOGP(DMSC, LOGL_NOTICE, "(%s) reset handler fsm created.\n", 
reset->name);
diff --git a/src/osmo-bsc/osmo_bsc_reset.c b/src/osmo-bsc/osmo_bsc_reset.c
index d28f548..aadbd86 100644
--- a/src/osmo-bsc/osmo_bsc_reset.c
+++ b/src/osmo-bsc/osmo_bsc_reset.c
@@ -124,7 +124,7 @@
 
 /* State machine definition */
 static struct osmo_fsm fsm = {
-   .name = "FSM RESET",
+   .name = "A-CONNECTION",
.states = fsm_states,
.num_states = ARRAY_SIZE(fsm_states),
.log_subsys = DMSC,
@@ -138,7 +138,7 @@
OSMO_ASSERT(msc->msc_con);
 
osmo_fsm_register();
-   msc->msc_con->fsm_reset = osmo_fsm_inst_alloc(, NULL, NULL, 
LOGL_DEBUG, "FSM RESET INST");
+   msc->msc_con->fsm_reset = osmo_fsm_inst_alloc(, NULL, NULL, 
LOGL_DEBUG, NULL);
OSMO_ASSERT(msc->msc_con->fsm_reset);
 
msc->msc_con->fsm_reset->priv = msc;

-- 
To view, visit https://gerrit.osmocom.org/4403
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1b44d26cebc4a47094d7b8b3983e5737b88bf003
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-bsc[master]: Rename osmo_fsm to avoid illegal space in name + more meanin...

2017-10-24 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/4403
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I1b44d26cebc4a47094d7b8b3983e5737b88bf003
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[PATCH] osmo-bsc[master]: Rename osmo_fsm to avoid illegal space in name + more meanin...

2017-10-24 Thread Harald Welte

Review at  https://gerrit.osmocom.org/4403

Rename osmo_fsm to avoid illegal space in name + more meaningful name

A FSM doesn't need "FSM" in its name, as it is obvious that it is a
FSM.  Also, having two that are called RESET is confusing, so let's
try to come up with better names.

Also, after Change-Id I9ef59432f43a3cdb94e4cbb0c44ac3f9b2aac0f2 in
libosmocore, we now enforce that no FSM identifiers contain spaces
or other illegal characters.

Change-Id: I1b44d26cebc4a47094d7b8b3983e5737b88bf003
---
M src/libcommon-cs/a_reset.c
M src/osmo-bsc/osmo_bsc_reset.c
2 files changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/src/libcommon-cs/a_reset.c b/src/libcommon-cs/a_reset.c
index c40bc41..f08d813 100644
--- a/src/libcommon-cs/a_reset.c
+++ b/src/libcommon-cs/a_reset.c
@@ -124,7 +124,7 @@
 
 /* State machine definition */
 static struct osmo_fsm fsm = {
-   .name = "FSM RESET",
+   .name = "A-RESET",
.states = fsm_states,
.num_states = ARRAY_SIZE(fsm_states),
.log_subsys = DMSC,
@@ -149,7 +149,7 @@
reset->cb = cb;
strncpy(reset->name, name, sizeof(reset->name));
reset->conn_loss_counter = 0;
-   reset->fsm = osmo_fsm_inst_alloc(, NULL, NULL, LOGL_DEBUG, "FSM 
RESET INST");
+   reset->fsm = osmo_fsm_inst_alloc(, NULL, NULL, LOGL_DEBUG, NULL);
OSMO_ASSERT(reset->fsm);
reset->fsm->priv = reset;
LOGP(DMSC, LOGL_NOTICE, "(%s) reset handler fsm created.\n", 
reset->name);
diff --git a/src/osmo-bsc/osmo_bsc_reset.c b/src/osmo-bsc/osmo_bsc_reset.c
index d28f548..aadbd86 100644
--- a/src/osmo-bsc/osmo_bsc_reset.c
+++ b/src/osmo-bsc/osmo_bsc_reset.c
@@ -124,7 +124,7 @@
 
 /* State machine definition */
 static struct osmo_fsm fsm = {
-   .name = "FSM RESET",
+   .name = "A-CONNECTION",
.states = fsm_states,
.num_states = ARRAY_SIZE(fsm_states),
.log_subsys = DMSC,
@@ -138,7 +138,7 @@
OSMO_ASSERT(msc->msc_con);
 
osmo_fsm_register();
-   msc->msc_con->fsm_reset = osmo_fsm_inst_alloc(, NULL, NULL, 
LOGL_DEBUG, "FSM RESET INST");
+   msc->msc_con->fsm_reset = osmo_fsm_inst_alloc(, NULL, NULL, 
LOGL_DEBUG, NULL);
OSMO_ASSERT(msc->msc_con->fsm_reset);
 
msc->msc_con->fsm_reset->priv = msc;

-- 
To view, visit https://gerrit.osmocom.org/4403
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1b44d26cebc4a47094d7b8b3983e5737b88bf003
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte