pespin has submitted this change. (
https://gerrit.osmocom.org/c/osmo-cbc/+/28826 )
Change subject: Split event list for smscb_message_fsm and smscb_peer_fsm
......................................................................
Split event list for smscb_message_fsm and smscb_peer_fsm
It really doesn't make sense to share the event list betwen those for
several reasons.
First, because ech of those FSM relate to different things:
* smscb_message_fsm: Handling/scheduling of 1 smscb towards all peers
* smscb_peer_fsm: Handling/scheduling of 1 smscb towards 1 peer.
The former has higher level interface used by the REST
API, plus some mid level interface used by smscb_peer_fsm.
The later has a mid level interface used by smscb_message_fsm to
interact, and a lower level interface used by the SBcAP/CBSP links to
talk to.
Furthermore, this makes it a lot easier understanding which events are
sent from one to another FSM.
Change-Id: I909474d1ff4ec7ed20aff0981da47074397df6cb
---
M include/osmocom/cbc/Makefile.am
M include/osmocom/cbc/smscb_message_fsm.h
A include/osmocom/cbc/smscb_peer_fsm.h
M src/cbc_message.c
M src/cbsp_link_fsm.c
M src/sbcap_link_fsm.c
M src/smscb_message_fsm.c
M src/smscb_peer_fsm.c
8 files changed, 197 insertions(+), 179 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, approved
osmith: Looks good to me, but someone else must approve
laforge: Looks good to me, but someone else must approve
diff --git a/include/osmocom/cbc/Makefile.am b/include/osmocom/cbc/Makefile.am
index dc3a21f..c4bc639 100644
--- a/include/osmocom/cbc/Makefile.am
+++ b/include/osmocom/cbc/Makefile.am
@@ -13,4 +13,5 @@
sbcap_link_fsm.h \
rest_it_op.h \
smscb_message_fsm.h \
+ smscb_peer_fsm.h \
$(NULL)
diff --git a/include/osmocom/cbc/smscb_message_fsm.h
b/include/osmocom/cbc/smscb_message_fsm.h
index dec719b..7970fd5 100644
--- a/include/osmocom/cbc/smscb_message_fsm.h
+++ b/include/osmocom/cbc/smscb_message_fsm.h
@@ -3,36 +3,28 @@
#include <stdint.h>
#include <osmocom/core/fsm.h>
-enum smscb_fsm_event {
- SMSCB_E_CHILD_DIED,
+enum smscb_message_fsm_event {
+ SMSCB_MSG_E_CHILD_DIED,
/* create a message (from REST) */
- SMSCB_E_CREATE,
+ SMSCB_MSG_E_CREATE,
/* replace a message (from REST) */
- SMSCB_E_REPLACE,
+ SMSCB_MSG_E_REPLACE,
/* get status of a message (from REST) */
- SMSCB_E_STATUS,
+ SMSCB_MSG_E_STATUS,
/* delete a message (from REST) */
- SMSCB_E_DELETE,
- /* CBSP peer confirms write */
- SMSCB_E_CBSP_WRITE_ACK,
- SMSCB_E_CBSP_WRITE_NACK,
- /* CBSP peer confirms replace */
- SMSCB_E_CBSP_REPLACE_ACK,
- SMSCB_E_CBSP_REPLACE_NACK,
- /* CBSP peer confirms delete */
- SMSCB_E_CBSP_DELETE_ACK,
- SMSCB_E_CBSP_DELETE_NACK,
- /* CBSP peer confirms status query */
- SMSCB_E_CBSP_STATUS_ACK,
- SMSCB_E_CBSP_STATUS_NACK,
- /* SBc-AP peer confirms write */
- SMSCB_E_SBCAP_WRITE_ACK,
- SMSCB_E_SBCAP_WRITE_NACK,
- /* SBc-AP peer confirms delete */
- SMSCB_E_SBCAP_DELETE_ACK,
- SMSCB_E_SBCAP_DELETE_NACK,
- /* SBc-AP peer sends Write Replace Warning Indication to us */
- SMSCB_E_SBCAP_WRITE_IND,
+ SMSCB_MSG_E_DELETE,
+ /* peer confirms write */
+ SMSCB_MSG_E_WRITE_ACK,
+ SMSCB_MSG_E_WRITE_NACK,
+ /* peer confirms replace */
+ SMSCB_MSG_E_REPLACE_ACK,
+ SMSCB_MSG_E_REPLACE_NACK,
+ /* peer confirms delete */
+ SMSCB_MSG_E_DELETE_ACK,
+ SMSCB_MSG_E_DELETE_NACK,
+ /* peer confirms status query */
+ SMSCB_MSG_E_STATUS_ACK,
+ SMSCB_MSG_E_STATUS_NACK
};
enum smscb_fsm_state {
@@ -58,4 +50,4 @@
T_WAIT_DELETE_ACK,
};
-extern const struct value_string smscb_fsm_event_names[];
+extern const struct value_string smscb_message_fsm_event_names[];
diff --git a/include/osmocom/cbc/smscb_peer_fsm.h b/include/osmocom/cbc/smscb_peer_fsm.h
new file mode 100644
index 0000000..7bf1c54
--- /dev/null
+++ b/include/osmocom/cbc/smscb_peer_fsm.h
@@ -0,0 +1,37 @@
+#pragma once
+
+#include <stdint.h>
+#include <osmocom/core/fsm.h>
+
+enum smscb_peer_fsm_event {
+ /* create a message (from REST) */
+ SMSCB_PEER_E_CREATE,
+ /* replace a message (from REST) */
+ SMSCB_PEER_E_REPLACE,
+ /* get status of a message (from REST) */
+ SMSCB_PEER_E_STATUS,
+ /* delete a message (from REST) */
+ SMSCB_PEER_E_DELETE,
+ /* CBSP peer confirms write */
+ SMSCB_PEER_E_CBSP_WRITE_ACK,
+ SMSCB_PEER_E_CBSP_WRITE_NACK,
+ /* CBSP peer confirms replace */
+ SMSCB_PEER_E_CBSP_REPLACE_ACK,
+ SMSCB_PEER_E_CBSP_REPLACE_NACK,
+ /* CBSP peer confirms delete */
+ SMSCB_PEER_E_CBSP_DELETE_ACK,
+ SMSCB_PEER_E_CBSP_DELETE_NACK,
+ /* CBSP peer confirms status query */
+ SMSCB_PEER_E_CBSP_STATUS_ACK,
+ SMSCB_PEER_E_CBSP_STATUS_NACK,
+ /* SBc-AP peer confirms write */
+ SMSCB_PEER_E_SBCAP_WRITE_ACK,
+ SMSCB_PEER_E_SBCAP_WRITE_NACK,
+ /* SBc-AP peer confirms delete */
+ SMSCB_PEER_E_SBCAP_DELETE_ACK,
+ SMSCB_PEER_E_SBCAP_DELETE_NACK,
+ /* SBc-AP peer sends Write Replace Warning Indication to us */
+ SMSCB_PEER_E_SBCAP_WRITE_IND,
+};
+
+extern const struct value_string smscb_peer_fsm_event_names[];
diff --git a/src/cbc_message.c b/src/cbc_message.c
index 029abcb..a2bf86a 100644
--- a/src/cbc_message.c
+++ b/src/cbc_message.c
@@ -130,7 +130,7 @@
}
/* kick off the state machine[s] */
- if (osmo_fsm_inst_dispatch(cbcmsg->fi, SMSCB_E_CREATE, op) < 0) {
+ if (osmo_fsm_inst_dispatch(cbcmsg->fi, SMSCB_MSG_E_CREATE, op) < 0) {
rest_it_op_set_http_result(op, 500, "Illegal FSM event");
rest_it_op_complete(op);
}
@@ -142,7 +142,7 @@
void cbc_message_delete(struct cbc_message *cbcmsg, struct rest_it_op *op)
{
- if (osmo_fsm_inst_dispatch(cbcmsg->fi, SMSCB_E_DELETE, op) < 0) {
+ if (osmo_fsm_inst_dispatch(cbcmsg->fi, SMSCB_MSG_E_DELETE, op) < 0) {
rest_it_op_set_http_result(op, 500, "Illegal FSM event");
rest_it_op_complete(op);
}
diff --git a/src/cbsp_link_fsm.c b/src/cbsp_link_fsm.c
index eba21a7..40414d0 100644
--- a/src/cbsp_link_fsm.c
+++ b/src/cbsp_link_fsm.c
@@ -27,7 +27,7 @@
#include <osmocom/cbc/cbsp_link.h>
#include <osmocom/cbc/cbsp_link_fsm.h>
#include <osmocom/cbc/debug.h>
-#include <osmocom/cbc/smscb_message_fsm.h>
+#include <osmocom/cbc/smscb_peer_fsm.h>
#define S(x) (1 << (x))
@@ -339,22 +339,22 @@
switch (dec->msg_type) {
case CBSP_MSGT_WRITE_REPLACE_COMPL:
if (dec->u.write_replace_compl.old_serial_nr)
- return osmo_fsm_inst_dispatch(mp->fi, SMSCB_E_CBSP_REPLACE_ACK, dec);
+ return osmo_fsm_inst_dispatch(mp->fi, SMSCB_PEER_E_CBSP_REPLACE_ACK, dec);
else
- return osmo_fsm_inst_dispatch(mp->fi, SMSCB_E_CBSP_WRITE_ACK, dec);
+ return osmo_fsm_inst_dispatch(mp->fi, SMSCB_PEER_E_CBSP_WRITE_ACK, dec);
case CBSP_MSGT_WRITE_REPLACE_FAIL:
if (dec->u.write_replace_fail.old_serial_nr)
- return osmo_fsm_inst_dispatch(mp->fi, SMSCB_E_CBSP_REPLACE_NACK, dec);
+ return osmo_fsm_inst_dispatch(mp->fi, SMSCB_PEER_E_CBSP_REPLACE_NACK, dec);
else
- return osmo_fsm_inst_dispatch(mp->fi, SMSCB_E_CBSP_WRITE_NACK, dec);
+ return osmo_fsm_inst_dispatch(mp->fi, SMSCB_PEER_E_CBSP_WRITE_NACK, dec);
case CBSP_MSGT_KILL_COMPL:
- return osmo_fsm_inst_dispatch(mp->fi, SMSCB_E_CBSP_DELETE_ACK, dec);
+ return osmo_fsm_inst_dispatch(mp->fi, SMSCB_PEER_E_CBSP_DELETE_ACK, dec);
case CBSP_MSGT_KILL_FAIL:
- return osmo_fsm_inst_dispatch(mp->fi, SMSCB_E_CBSP_DELETE_NACK, dec);
+ return osmo_fsm_inst_dispatch(mp->fi, SMSCB_PEER_E_CBSP_DELETE_NACK, dec);
case CBSP_MSGT_MSG_STATUS_QUERY_COMPL:
- return osmo_fsm_inst_dispatch(mp->fi, SMSCB_E_CBSP_STATUS_ACK, dec);
+ return osmo_fsm_inst_dispatch(mp->fi, SMSCB_PEER_E_CBSP_STATUS_ACK, dec);
case CBSP_MSGT_MSG_STATUS_QUERY_FAIL:
- return osmo_fsm_inst_dispatch(mp->fi, SMSCB_E_CBSP_STATUS_NACK, dec);
+ return osmo_fsm_inst_dispatch(mp->fi, SMSCB_PEER_E_CBSP_STATUS_NACK, dec);
default:
LOGPCC(link, LOGL_ERROR, "unknown message %s\n",
get_value_string(cbsp_msg_type_names, dec->msg_type));
diff --git a/src/sbcap_link_fsm.c b/src/sbcap_link_fsm.c
index f2cbe82..685ce7d 100644
--- a/src/sbcap_link_fsm.c
+++ b/src/sbcap_link_fsm.c
@@ -31,7 +31,7 @@
#include <osmocom/cbc/sbcap_msg.h>
#include <osmocom/cbc/debug.h>
#include <osmocom/cbc/cbc_peer.h>
-#include <osmocom/cbc/smscb_message_fsm.h>
+#include <osmocom/cbc/smscb_peer_fsm.h>
#define S(x) (1 << (x))
@@ -249,7 +249,7 @@
A_SEQUENCE_OF(void) *as_pdu;
SBcAP_Write_Replace_Warning_Response_IEs_t *ie;
SBcAP_SBC_AP_PDU_t *err_ind_pdu;
- int ev = SMSCB_E_SBCAP_WRITE_ACK;
+ int ev = SMSCB_PEER_E_SBCAP_WRITE_ACK;
as_pdu = (void
*)&pdu->choice.successfulOutcome.value.choice.Write_Replace_Warning_Response.protocolIEs.list;
@@ -257,9 +257,9 @@
ie = sbcap_as_find_ie(as_pdu, 1);
if (ie) {
if (ie->value.choice.Cause != SBcAP_Cause_message_accepted)
- ev = SMSCB_E_SBCAP_WRITE_NACK;
+ ev = SMSCB_PEER_E_SBCAP_WRITE_NACK;
} else { /* This shouldn't happen, the IE is Mandatory... */
- ev = SMSCB_E_SBCAP_WRITE_NACK;
+ ev = SMSCB_PEER_E_SBCAP_WRITE_NACK;
err_ind_pdu = sbcap_gen_error_ind(link,
SBcAP_Cause_missing_mandatory_element, pdu);
if (err_ind_pdu)
@@ -362,7 +362,7 @@
case SBcAP_SBC_AP_PDU_PR_initiatingMessage:
switch (pdu->choice.initiatingMessage.procedureCode) {
case SBcAP_ProcedureId_Write_Replace_Warning_Indication:
- return osmo_fsm_inst_dispatch(mp->fi, SMSCB_E_SBCAP_WRITE_IND, pdu);
+ return osmo_fsm_inst_dispatch(mp->fi, SMSCB_PEER_E_SBCAP_WRITE_IND, pdu);
default:
break;
}
@@ -371,11 +371,11 @@
switch (pdu->choice.successfulOutcome.procedureCode) {
case SBcAP_ProcedureId_Write_Replace_Warning:
//if (dec->u.write_replace_compl.old_serial_nr)
- // return osmo_fsm_inst_dispatch(mp->fi, SMSCB_E_SBcAP_REPLACE_ACK, dec);
+ // return osmo_fsm_inst_dispatch(mp->fi, SMSCB_PEER_E_SBcAP_REPLACE_ACK, dec);
//else
return cbc_sbcap_link_rx_write_replace_warn_resp(link, mp, pdu);
case SBcAP_ProcedureId_Stop_Warning:
- return osmo_fsm_inst_dispatch(mp->fi, SMSCB_E_SBCAP_DELETE_ACK, pdu);
+ return osmo_fsm_inst_dispatch(mp->fi, SMSCB_PEER_E_SBCAP_DELETE_ACK, pdu);
default:
break;
}
@@ -383,7 +383,7 @@
case SBcAP_SBC_AP_PDU_PR_unsuccessfulOutcome:
switch (pdu->choice.unsuccessfulOutcome.procedureCode) {
case SBcAP_ProcedureId_Stop_Warning:
- return osmo_fsm_inst_dispatch(mp->fi, SMSCB_E_SBCAP_DELETE_NACK, pdu);
+ return osmo_fsm_inst_dispatch(mp->fi, SMSCB_PEER_E_SBCAP_DELETE_NACK, pdu);
default:
break;
}
diff --git a/src/smscb_message_fsm.c b/src/smscb_message_fsm.c
index 40d4535..9281736 100644
--- a/src/smscb_message_fsm.c
+++ b/src/smscb_message_fsm.c
@@ -35,20 +35,38 @@
#include <osmocom/cbc/debug.h>
#include <osmocom/cbc/rest_it_op.h>
#include <osmocom/cbc/smscb_message_fsm.h>
+#include <osmocom/cbc/smscb_peer_fsm.h>
#define S(x) (1 << (x))
+const struct value_string smscb_message_fsm_event_names[] = {
+ { SMSCB_MSG_E_CHILD_DIED, "CHILD_DIED" },
+ { SMSCB_MSG_E_CREATE, "CREATE" },
+ { SMSCB_MSG_E_REPLACE, "REPLACE" },
+ { SMSCB_MSG_E_STATUS, "STATUS" },
+ { SMSCB_MSG_E_DELETE, "DELETE" },
+ { SMSCB_MSG_E_WRITE_ACK, "WRITE_ACK" },
+ { SMSCB_MSG_E_WRITE_NACK, "WRITE_NACK" },
+ { SMSCB_MSG_E_REPLACE_ACK, "REPLACE_ACK" },
+ { SMSCB_MSG_E_REPLACE_NACK, "REPLACE_NACK" },
+ { SMSCB_MSG_E_DELETE_ACK, "DELETE_ACK" },
+ { SMSCB_MSG_E_DELETE_NACK, "DELETE_NACK" },
+ { SMSCB_MSG_E_STATUS_ACK, "STATUS_ACK" },
+ { SMSCB_MSG_E_STATUS_NACK, "STATUS_NACK" },
+ { 0, NULL }
+};
+
static void smscb_fsm_init(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{
struct cbc_message *cbcmsg = fi->priv;
switch (event) {
- case SMSCB_E_CREATE:
+ case SMSCB_MSG_E_CREATE:
OSMO_ASSERT(!cbcmsg->it_op);
cbcmsg->it_op = data;
osmo_fsm_inst_state_chg(fi, SMSCB_S_WAIT_WRITE_ACK, 15, T_WAIT_WRITE_ACK);
/* forward this event to all child FSMs (i.e. all smscb_message_peer) */
- osmo_fsm_inst_broadcast_children(fi, SMSCB_E_CREATE, NULL);
+ osmo_fsm_inst_broadcast_children(fi, SMSCB_PEER_E_CREATE, NULL);
break;
default:
OSMO_ASSERT(0);
@@ -61,10 +79,8 @@
struct osmo_fsm_inst *peer_fi;
switch (event) {
- case SMSCB_E_CBSP_WRITE_ACK:
- case SMSCB_E_CBSP_WRITE_NACK:
- case SMSCB_E_SBCAP_WRITE_ACK:
- case SMSCB_E_SBCAP_WRITE_NACK:
+ case SMSCB_MSG_E_WRITE_ACK:
+ case SMSCB_MSG_E_WRITE_NACK:
/* check if any per-peer children have not yet received the ACK or
* timed out */
llist_for_each_entry(peer_fi, &fi->proc.children, proc.child) {
@@ -92,26 +108,26 @@
struct cbc_message *cbcmsg = fi->priv;
switch (event) {
- case SMSCB_E_REPLACE:
+ case SMSCB_MSG_E_REPLACE:
OSMO_ASSERT(!cbcmsg->it_op);
cbcmsg->it_op = data;
osmo_fsm_inst_state_chg(fi, SMSCB_S_WAIT_REPLACE_ACK, 15, T_WAIT_REPLACE_ACK);
/* forward this event to all child FSMs (i.e. all smscb_message_peer) */
- osmo_fsm_inst_broadcast_children(fi, SMSCB_E_REPLACE, data);
+ osmo_fsm_inst_broadcast_children(fi, SMSCB_PEER_E_REPLACE, data);
break;
- case SMSCB_E_STATUS:
+ case SMSCB_MSG_E_STATUS:
OSMO_ASSERT(!cbcmsg->it_op);
cbcmsg->it_op = data;
osmo_fsm_inst_state_chg(fi, SMSCB_S_WAIT_STATUS_ACK, 15, T_WAIT_STATUS_ACK);
/* forward this event to all child FSMs (i.e. all smscb_message_peer) */
- osmo_fsm_inst_broadcast_children(fi, SMSCB_E_STATUS, data);
+ osmo_fsm_inst_broadcast_children(fi, SMSCB_PEER_E_STATUS, data);
break;
- case SMSCB_E_DELETE:
+ case SMSCB_MSG_E_DELETE:
OSMO_ASSERT(!cbcmsg->it_op);
cbcmsg->it_op = data;
osmo_fsm_inst_state_chg(fi, SMSCB_S_WAIT_DELETE_ACK, 15, T_WAIT_DELETE_ACK);
/* forward this event to all child FSMs (i.e. all smscb_message_peer) */
- osmo_fsm_inst_broadcast_children(fi, SMSCB_E_DELETE, data);
+ osmo_fsm_inst_broadcast_children(fi, SMSCB_PEER_E_DELETE, data);
break;
default:
OSMO_ASSERT(0);
@@ -124,8 +140,8 @@
struct osmo_fsm_inst *peer_fi;
switch (event) {
- case SMSCB_E_CBSP_REPLACE_ACK:
- case SMSCB_E_CBSP_REPLACE_NACK:
+ case SMSCB_MSG_E_REPLACE_ACK:
+ case SMSCB_MSG_E_REPLACE_NACK:
llist_for_each_entry(peer_fi, &fi->proc.children, proc.child) {
if (peer_fi->state == SMSCB_S_WAIT_REPLACE_ACK)
return;
@@ -152,8 +168,8 @@
struct osmo_fsm_inst *peer_fi;
switch (event) {
- case SMSCB_E_CBSP_STATUS_ACK:
- case SMSCB_E_CBSP_STATUS_NACK:
+ case SMSCB_MSG_E_STATUS_ACK:
+ case SMSCB_MSG_E_STATUS_NACK:
llist_for_each_entry(peer_fi, &fi->proc.children, proc.child) {
if (peer_fi->state == SMSCB_S_WAIT_STATUS_ACK)
return;
@@ -180,10 +196,8 @@
struct osmo_fsm_inst *peer_fi;
switch (event) {
- case SMSCB_E_CBSP_DELETE_ACK:
- case SMSCB_E_CBSP_DELETE_NACK:
- case SMSCB_E_SBCAP_DELETE_ACK:
- case SMSCB_E_SBCAP_DELETE_NACK:
+ case SMSCB_MSG_E_DELETE_ACK:
+ case SMSCB_MSG_E_DELETE_NACK:
llist_for_each_entry(peer_fi, &fi->proc.children, proc.child) {
if (peer_fi->state != SMSCB_S_DELETED)
return;
@@ -223,25 +237,23 @@
static struct osmo_fsm_state smscb_fsm_states[] = {
[SMSCB_S_INIT] = {
.name = "INIT",
- .in_event_mask = S(SMSCB_E_CREATE),
+ .in_event_mask = S(SMSCB_MSG_E_CREATE),
.out_state_mask = S(SMSCB_S_WAIT_WRITE_ACK),
.action = smscb_fsm_init,
},
[SMSCB_S_WAIT_WRITE_ACK] = {
.name = "WAIT_WRITE_ACK",
- .in_event_mask = S(SMSCB_E_CBSP_WRITE_ACK) |
- S(SMSCB_E_CBSP_WRITE_NACK) |
- S(SMSCB_E_SBCAP_WRITE_ACK) |
- S(SMSCB_E_SBCAP_WRITE_NACK),
+ .in_event_mask = S(SMSCB_MSG_E_WRITE_ACK) |
+ S(SMSCB_MSG_E_WRITE_NACK),
.out_state_mask = S(SMSCB_S_ACTIVE),
.action = smscb_fsm_wait_write_ack,
.onleave = smscb_fsm_wait_write_ack_onleave,
},
[SMSCB_S_ACTIVE] = {
.name = "ACTIVE",
- .in_event_mask = S(SMSCB_E_REPLACE) |
- S(SMSCB_E_STATUS) |
- S(SMSCB_E_DELETE),
+ .in_event_mask = S(SMSCB_MSG_E_REPLACE) |
+ S(SMSCB_MSG_E_STATUS) |
+ S(SMSCB_MSG_E_DELETE),
.out_state_mask = S(SMSCB_S_ACTIVE) |
S(SMSCB_S_WAIT_REPLACE_ACK) |
S(SMSCB_S_WAIT_STATUS_ACK) |
@@ -250,26 +262,24 @@
},
[SMSCB_S_WAIT_REPLACE_ACK] = {
.name = "WAIT_REPLACE_ACK",
- .in_event_mask = S(SMSCB_E_CBSP_REPLACE_ACK) |
- S(SMSCB_E_CBSP_REPLACE_NACK),
+ .in_event_mask = S(SMSCB_MSG_E_REPLACE_ACK) |
+ S(SMSCB_MSG_E_REPLACE_NACK),
.out_state_mask = S(SMSCB_S_ACTIVE),
.action = smscb_fsm_wait_replace_ack,
.onleave = smscb_fsm_wait_replace_ack_onleave,
},
[SMSCB_S_WAIT_STATUS_ACK] = {
.name = "WAIT_STATUS_ACK",
- .in_event_mask = S(SMSCB_E_CBSP_STATUS_ACK) |
- S(SMSCB_E_CBSP_STATUS_NACK),
+ .in_event_mask = S(SMSCB_MSG_E_STATUS_ACK) |
+ S(SMSCB_MSG_E_STATUS_NACK),
.out_state_mask = S(SMSCB_S_ACTIVE),
.action = smscb_fsm_wait_status_ack,
.onleave = smscb_fsm_wait_status_ack_onleave,
},
[SMSCB_S_WAIT_DELETE_ACK] = {
.name = "WAIT_DELETE_ACK",
- .in_event_mask = S(SMSCB_E_CBSP_DELETE_ACK) |
- S(SMSCB_E_CBSP_DELETE_NACK) |
- S(SMSCB_E_SBCAP_DELETE_ACK) |
- S(SMSCB_E_SBCAP_DELETE_NACK),
+ .in_event_mask = S(SMSCB_MSG_E_DELETE_ACK) |
+ S(SMSCB_MSG_E_DELETE_NACK),
.out_state_mask = S(SMSCB_S_DELETED),
.action = smscb_fsm_wait_delete_ack,
.onleave = smscb_fsm_wait_delete_ack_onleave,
@@ -311,7 +321,7 @@
static void smscb_fsm_allstate(struct osmo_fsm_inst *Fi, uint32_t event, void *data)
{
switch (event) {
- case SMSCB_E_CHILD_DIED:
+ case SMSCB_MSG_E_CHILD_DIED:
break;
default:
OSMO_ASSERT(0);
@@ -332,11 +342,11 @@
.name = "SMSCB",
.states = smscb_fsm_states,
.num_states = ARRAY_SIZE(smscb_fsm_states),
- .allstate_event_mask = S(SMSCB_E_CHILD_DIED),
+ .allstate_event_mask = S(SMSCB_MSG_E_CHILD_DIED),
.allstate_action = smscb_fsm_allstate,
.timer_cb = smscb_fsm_timer_cb,
.log_subsys = DSMSCB,
- .event_names = smscb_fsm_event_names,
+ .event_names = smscb_message_fsm_event_names,
.cleanup= smscb_fsm_cleanup,
};
diff --git a/src/smscb_peer_fsm.c b/src/smscb_peer_fsm.c
index 2c1edab..589a832 100644
--- a/src/smscb_peer_fsm.c
+++ b/src/smscb_peer_fsm.c
@@ -40,29 +40,29 @@
#include <osmocom/cbc/sbcap_link.h>
#include <osmocom/cbc/sbcap_msg.h>
#include <osmocom/cbc/debug.h>
+#include <osmocom/cbc/smscb_peer_fsm.h>
#include <osmocom/cbc/smscb_message_fsm.h>
#define S(x) (1 << (x))
-const struct value_string smscb_fsm_event_names[] = {
- { SMSCB_E_CHILD_DIED, "CHILD_DIED" },
- { SMSCB_E_CREATE, "CREATE" },
- { SMSCB_E_REPLACE, "REPLACE" },
- { SMSCB_E_STATUS, "STATUS" },
- { SMSCB_E_DELETE, "DELETE" },
- { SMSCB_E_CBSP_WRITE_ACK, "CBSP_WRITE_ACK" },
- { SMSCB_E_CBSP_WRITE_NACK, "CBSP_WRITE_NACK" },
- { SMSCB_E_CBSP_REPLACE_ACK, "CBSP_REPLACE_ACK" },
- { SMSCB_E_CBSP_REPLACE_NACK, "CBSP_REPLACE_NACK" },
- { SMSCB_E_CBSP_DELETE_ACK, "CBSP_DELETE_ACK" },
- { SMSCB_E_CBSP_DELETE_NACK, "CBSP_DELETE_NACK" },
- { SMSCB_E_CBSP_STATUS_ACK, "CBSP_STATUS_ACK" },
- { SMSCB_E_CBSP_STATUS_NACK, "CBSP_STATUS_NACK" },
- { SMSCB_E_SBCAP_WRITE_ACK, "SBcAP_WRITE_ACK" },
- { SMSCB_E_SBCAP_WRITE_NACK, "SBcAP_WRITE_NACK" },
- { SMSCB_E_SBCAP_DELETE_ACK, "SBcAP_DELETE_ACK" },
- { SMSCB_E_SBCAP_DELETE_NACK, "SBcAP_DELETE_NACK" },
- { SMSCB_E_SBCAP_WRITE_IND, "SBcAP_WRITE_IND" },
+const struct value_string smscb_peer_fsm_event_names[] = {
+ { SMSCB_PEER_E_CREATE, "CREATE" },
+ { SMSCB_PEER_E_REPLACE, "REPLACE" },
+ { SMSCB_PEER_E_STATUS, "STATUS" },
+ { SMSCB_PEER_E_DELETE, "DELETE" },
+ { SMSCB_PEER_E_CBSP_WRITE_ACK, "CBSP_WRITE_ACK" },
+ { SMSCB_PEER_E_CBSP_WRITE_NACK, "CBSP_WRITE_NACK" },
+ { SMSCB_PEER_E_CBSP_REPLACE_ACK, "CBSP_REPLACE_ACK" },
+ { SMSCB_PEER_E_CBSP_REPLACE_NACK, "CBSP_REPLACE_NACK" },
+ { SMSCB_PEER_E_CBSP_DELETE_ACK, "CBSP_DELETE_ACK" },
+ { SMSCB_PEER_E_CBSP_DELETE_NACK, "CBSP_DELETE_NACK" },
+ { SMSCB_PEER_E_CBSP_STATUS_ACK, "CBSP_STATUS_ACK" },
+ { SMSCB_PEER_E_CBSP_STATUS_NACK, "CBSP_STATUS_NACK" },
+ { SMSCB_PEER_E_SBCAP_WRITE_ACK, "SBcAP_WRITE_ACK" },
+ { SMSCB_PEER_E_SBCAP_WRITE_NACK, "SBcAP_WRITE_NACK" },
+ { SMSCB_PEER_E_SBCAP_DELETE_ACK, "SBcAP_DELETE_ACK" },
+ { SMSCB_PEER_E_SBCAP_DELETE_NACK, "SBcAP_DELETE_NACK" },
+ { SMSCB_PEER_E_SBCAP_WRITE_IND, "SBcAP_WRITE_IND" },
{ 0, NULL }
};
@@ -349,7 +349,7 @@
int rc;
switch (event) {
- case SMSCB_E_CREATE:
+ case SMSCB_PEER_E_CREATE:
/* send it to peer */
rc = peer_new_cbc_message(mp->peer, mp->cbcmsg);
if (rc == 0) {
@@ -372,24 +372,24 @@
SBcAP_Write_Replace_Warning_Response_IEs_t *ie;
switch (event) {
- case SMSCB_E_CBSP_WRITE_ACK:
+ case SMSCB_PEER_E_CBSP_WRITE_ACK:
dec = data;
msg_peer_append_cbsp_compl(mp, &dec->u.write_replace_compl.num_compl_list);
msg_peer_append_cbsp_cell(mp, &dec->u.write_replace_compl.cell_list);
osmo_fsm_inst_state_chg(fi, SMSCB_S_ACTIVE, 0, 0);
/* Signal parent fsm about completion */
- osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_E_CBSP_WRITE_ACK, mp);
+ osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_MSG_E_WRITE_ACK, mp);
break;
- case SMSCB_E_CBSP_WRITE_NACK:
+ case SMSCB_PEER_E_CBSP_WRITE_NACK:
dec = data;
msg_peer_append_cbsp_compl(mp, &dec->u.write_replace_fail.num_compl_list);
msg_peer_append_cbsp_cell(mp, &dec->u.write_replace_fail.cell_list);
msg_peer_append_cbsp_fail(mp, &dec->u.write_replace_fail.fail_list);
osmo_fsm_inst_state_chg(fi, SMSCB_S_ACTIVE, 0, 0);
/* Signal parent fsm about completion */
- osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_E_CBSP_WRITE_NACK, mp);
+ osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_MSG_E_WRITE_NACK, mp);
break;
- case SMSCB_E_SBCAP_WRITE_ACK:
+ case SMSCB_PEER_E_SBCAP_WRITE_ACK:
sbcap = data;
OSMO_ASSERT(sbcap->present == SBcAP_SBC_AP_PDU_PR_successfulOutcome);
OSMO_ASSERT(sbcap->choice.successfulOutcome.procedureCode ==
SBcAP_ProcedureId_Write_Replace_Warning);
@@ -402,12 +402,12 @@
}
osmo_fsm_inst_state_chg(fi, SMSCB_S_ACTIVE, 0, 0);
/* Signal parent fsm about completion */
- osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_E_SBCAP_WRITE_ACK, mp);
+ osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_MSG_E_WRITE_ACK, mp);
break;
- case SMSCB_E_SBCAP_WRITE_NACK:
+ case SMSCB_PEER_E_SBCAP_WRITE_NACK:
osmo_fsm_inst_state_chg(fi, SMSCB_S_ACTIVE, 0, 0);
/* Signal parent fsm about completion */
- osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_E_SBCAP_WRITE_NACK, mp);
+ osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_MSG_E_WRITE_NACK, mp);
break;
default:
OSMO_ASSERT(0);
@@ -420,7 +420,7 @@
struct osmo_cbsp_decoded *cbsp;
switch (event) {
- case SMSCB_E_REPLACE: /* send WRITE-REPLACE to BSC */
+ case SMSCB_PEER_E_REPLACE: /* send WRITE-REPLACE to BSC */
cbsp = osmo_cbsp_decoded_alloc(mp->peer, CBSP_MSGT_WRITE_REPLACE);
OSMO_ASSERT(cbsp);
cbsp->u.write_replace.msg_id = mp->cbcmsg->msg.message_id;
@@ -432,7 +432,7 @@
cbc_cbsp_link_tx(mp->peer->link.cbsp, cbsp);
osmo_fsm_inst_state_chg(fi, SMSCB_S_WAIT_REPLACE_ACK, 10, T_WAIT_REPLACE_ACK);
break;
- case SMSCB_E_STATUS: /* send MSG-STATUS-QUERY to BSC */
+ case SMSCB_PEER_E_STATUS: /* send MSG-STATUS-QUERY to BSC */
cbsp = osmo_cbsp_decoded_alloc(mp->peer, CBSP_MSGT_MSG_STATUS_QUERY);
OSMO_ASSERT(cbsp);
cbsp->u.msg_status_query.msg_id = mp->cbcmsg->msg.message_id;
@@ -453,20 +453,20 @@
struct osmo_cbsp_decoded *dec = NULL;
switch (event) {
- case SMSCB_E_CBSP_STATUS_ACK:
+ case SMSCB_PEER_E_CBSP_STATUS_ACK:
dec = data;
msg_peer_append_cbsp_compl(mp, &dec->u.msg_status_query_compl.num_compl_list);
osmo_fsm_inst_state_chg(fi, SMSCB_S_ACTIVE, 0, 0);
/* Signal parent fsm about completion */
- osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_E_CBSP_STATUS_ACK, mp);
+ osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_MSG_E_STATUS_ACK, mp);
break;
- case SMSCB_E_CBSP_STATUS_NACK:
+ case SMSCB_PEER_E_CBSP_STATUS_NACK:
dec = data;
msg_peer_append_cbsp_compl(mp, &dec->u.msg_status_query_fail.num_compl_list);
msg_peer_append_cbsp_fail(mp, &dec->u.msg_status_query_fail.fail_list);
osmo_fsm_inst_state_chg(fi, SMSCB_S_ACTIVE, 0, 0);
/* Signal parent fsm about completion */
- osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_E_CBSP_STATUS_NACK, mp);
+ osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_MSG_E_STATUS_NACK, mp);
break;
default:
OSMO_ASSERT(0);
@@ -480,22 +480,22 @@
struct osmo_cbsp_decoded *dec = NULL;
switch (event) {
- case SMSCB_E_CBSP_REPLACE_ACK:
+ case SMSCB_PEER_E_CBSP_REPLACE_ACK:
dec = data;
msg_peer_append_cbsp_compl(mp, &dec->u.write_replace_compl.num_compl_list);
msg_peer_append_cbsp_cell(mp, &dec->u.write_replace_compl.cell_list);
osmo_fsm_inst_state_chg(fi, SMSCB_S_ACTIVE, 0, 0);
/* Signal parent fsm about completion */
- osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_E_CBSP_REPLACE_ACK, mp);
+ osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_MSG_E_REPLACE_ACK, mp);
break;
- case SMSCB_E_CBSP_REPLACE_NACK:
+ case SMSCB_PEER_E_CBSP_REPLACE_NACK:
dec = data;
msg_peer_append_cbsp_compl(mp, &dec->u.write_replace_fail.num_compl_list);
msg_peer_append_cbsp_cell(mp, &dec->u.write_replace_fail.cell_list);
msg_peer_append_cbsp_fail(mp, &dec->u.write_replace_fail.fail_list);
osmo_fsm_inst_state_chg(fi, SMSCB_S_ACTIVE, 0, 0);
/* Signal parent fsm about completion */
- osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_E_CBSP_REPLACE_NACK, mp);
+ osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_MSG_E_REPLACE_NACK, mp);
break;
default:
OSMO_ASSERT(0);
@@ -509,16 +509,16 @@
//SBcAP_SBC_AP_PDU_t *pdu = NULL;
switch (event) {
- case SMSCB_E_CBSP_DELETE_ACK:
+ case SMSCB_PEER_E_CBSP_DELETE_ACK:
dec = data;
/* append results */
msg_peer_append_cbsp_compl(mp, &dec->u.kill_compl.num_compl_list);
msg_peer_append_cbsp_cell(mp, &dec->u.kill_compl.cell_list);
osmo_fsm_inst_state_chg(fi, SMSCB_S_DELETED, 0, 0);
/* Signal parent fsm about completion */
- osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_E_CBSP_DELETE_ACK, mp);
+ osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_MSG_E_DELETE_ACK, mp);
break;
- case SMSCB_E_CBSP_DELETE_NACK:
+ case SMSCB_PEER_E_CBSP_DELETE_NACK:
dec = data;
/* append results */
msg_peer_append_cbsp_compl(mp, &dec->u.kill_fail.num_compl_list);
@@ -526,19 +526,19 @@
msg_peer_append_cbsp_fail(mp, &dec->u.kill_fail.fail_list);
osmo_fsm_inst_state_chg(fi, SMSCB_S_DELETED, 0, 0);
/* Signal parent fsm about completion */
- osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_E_CBSP_DELETE_NACK, mp);
+ osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_MSG_E_DELETE_NACK, mp);
break;
- case SMSCB_E_SBCAP_DELETE_ACK:
+ case SMSCB_PEER_E_SBCAP_DELETE_ACK:
//pdu = data;
osmo_fsm_inst_state_chg(fi, SMSCB_S_DELETED, 0, 0);
/* Signal parent fsm about completion */
- osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_E_SBCAP_DELETE_ACK, mp);
+ osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_MSG_E_DELETE_ACK, mp);
break;
- case SMSCB_E_SBCAP_DELETE_NACK:
+ case SMSCB_PEER_E_SBCAP_DELETE_NACK:
//pdu = data;
osmo_fsm_inst_state_chg(fi, SMSCB_S_DELETED, 0, 0);
/* Signal parent fsm about completion */
- osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_E_SBCAP_DELETE_NACK, mp);
+ osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_MSG_E_DELETE_NACK, mp);
break;
default:
OSMO_ASSERT(0);
@@ -549,44 +549,22 @@
static int smscb_p_fsm_timer_cb(struct osmo_fsm_inst *fi)
{
- struct cbc_message_peer *mp = (struct cbc_message_peer *)fi->priv;
- int ev;
switch (fi->T) {
case T_WAIT_WRITE_ACK:
osmo_fsm_inst_state_chg(fi, SMSCB_S_ACTIVE, 0, 0);
- switch (mp->peer->proto) {
- case CBC_PEER_PROTO_CBSP:
- ev = SMSCB_E_CBSP_WRITE_NACK;
- break;
- case CBC_PEER_PROTO_SBcAP:
- ev = SMSCB_E_SBCAP_WRITE_NACK;
- break;
- default:
- OSMO_ASSERT(0);
- }
- osmo_fsm_inst_dispatch(fi->proc.parent, ev, NULL);
+ osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_MSG_E_WRITE_NACK, NULL);
break;
case T_WAIT_REPLACE_ACK:
osmo_fsm_inst_state_chg(fi, SMSCB_S_ACTIVE, 0, 0);
- osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_E_CBSP_REPLACE_NACK, NULL);
+ osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_MSG_E_REPLACE_NACK, NULL);
break;
case T_WAIT_STATUS_ACK:
osmo_fsm_inst_state_chg(fi, SMSCB_S_ACTIVE, 0, 0);
- osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_E_CBSP_STATUS_NACK, NULL);
+ osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_MSG_E_STATUS_NACK, NULL);
break;
case T_WAIT_DELETE_ACK:
osmo_fsm_inst_state_chg(fi, SMSCB_S_DELETED, 0, 0);
- switch (mp->peer->proto) {
- case CBC_PEER_PROTO_CBSP:
- ev = SMSCB_E_CBSP_DELETE_NACK;
- break;
- case CBC_PEER_PROTO_SBcAP:
- ev = SMSCB_E_SBCAP_DELETE_NACK;
- break;
- default:
- OSMO_ASSERT(0);
- }
- osmo_fsm_inst_dispatch(fi->proc.parent, ev, NULL);
+ osmo_fsm_inst_dispatch(fi->proc.parent, SMSCB_MSG_E_DELETE_NACK, NULL);
break;
default:
OSMO_ASSERT(0);
@@ -603,7 +581,7 @@
SBcAP_Write_Replace_Warning_Indication_IEs_t *ie;
switch (event) {
- case SMSCB_E_DELETE: /* send KILL to BSC */
+ case SMSCB_PEER_E_DELETE: /* send KILL to BSC */
switch (fi->state) {
case SMSCB_S_DELETED:
case SMSCB_S_INIT:
@@ -640,11 +618,11 @@
break;
case CBC_PEER_PROTO_SABP:
default:
- osmo_panic("SMSCB_E_DELETE not implemented for proto %u",
mp->peer->proto);
+ osmo_panic("SMSCB_PEER_E_DELETE not implemented for proto %u",
mp->peer->proto);
}
osmo_fsm_inst_state_chg(fi, SMSCB_S_WAIT_DELETE_ACK, 10, T_WAIT_DELETE_ACK);
break;
- case SMSCB_E_SBCAP_WRITE_IND:
+ case SMSCB_PEER_E_SBCAP_WRITE_IND:
sbcap = (SBcAP_SBC_AP_PDU_t *)data;
OSMO_ASSERT(sbcap->present == SBcAP_SBC_AP_PDU_PR_initiatingMessage);
OSMO_ASSERT(sbcap->choice.initiatingMessage.procedureCode ==
SBcAP_ProcedureId_Write_Replace_Warning_Indication);
@@ -671,24 +649,24 @@
static const struct osmo_fsm_state smscb_p_fsm_states[] = {
[SMSCB_S_INIT] = {
.name = "INIT",
- .in_event_mask = S(SMSCB_E_CREATE),
+ .in_event_mask = S(SMSCB_PEER_E_CREATE),
.out_state_mask = S(SMSCB_S_WAIT_WRITE_ACK),
.action = smscb_p_fsm_init,
},
[SMSCB_S_WAIT_WRITE_ACK] = {
.name = "WAIT_WRITE_ACK",
- .in_event_mask = S(SMSCB_E_CBSP_WRITE_ACK) |
- S(SMSCB_E_CBSP_WRITE_NACK) |
- S(SMSCB_E_SBCAP_WRITE_ACK) |
- S(SMSCB_E_SBCAP_WRITE_NACK),
+ .in_event_mask = S(SMSCB_PEER_E_CBSP_WRITE_ACK) |
+ S(SMSCB_PEER_E_CBSP_WRITE_NACK) |
+ S(SMSCB_PEER_E_SBCAP_WRITE_ACK) |
+ S(SMSCB_PEER_E_SBCAP_WRITE_NACK),
.out_state_mask = S(SMSCB_S_ACTIVE) |
S(SMSCB_S_WAIT_DELETE_ACK),
.action = smscb_p_fsm_wait_write_ack,
},
[SMSCB_S_ACTIVE] = {
.name = "ACTIVE",
- .in_event_mask = S(SMSCB_E_REPLACE) |
- S(SMSCB_E_STATUS),
+ .in_event_mask = S(SMSCB_PEER_E_REPLACE) |
+ S(SMSCB_PEER_E_STATUS),
.out_state_mask = S(SMSCB_S_WAIT_REPLACE_ACK) |
S(SMSCB_S_WAIT_STATUS_ACK) |
S(SMSCB_S_WAIT_DELETE_ACK),
@@ -696,26 +674,26 @@
},
[SMSCB_S_WAIT_STATUS_ACK] = {
.name = "WAIT_STATUS_ACK",
- .in_event_mask = S(SMSCB_E_CBSP_STATUS_ACK) |
- S(SMSCB_E_CBSP_STATUS_NACK),
+ .in_event_mask = S(SMSCB_PEER_E_CBSP_STATUS_ACK) |
+ S(SMSCB_PEER_E_CBSP_STATUS_NACK),
.out_state_mask = S(SMSCB_S_ACTIVE) |
S(SMSCB_S_WAIT_DELETE_ACK),
.action = smscb_p_fsm_wait_status_ack,
},
[SMSCB_S_WAIT_REPLACE_ACK] = {
.name = "WAIT_REPLACE_ACK",
- .in_event_mask = S(SMSCB_E_CBSP_REPLACE_ACK) |
- S(SMSCB_E_CBSP_REPLACE_NACK),
+ .in_event_mask = S(SMSCB_PEER_E_CBSP_REPLACE_ACK) |
+ S(SMSCB_PEER_E_CBSP_REPLACE_NACK),
.out_state_mask = S(SMSCB_S_ACTIVE) |
S(SMSCB_S_WAIT_DELETE_ACK),
.action = smscb_p_fsm_wait_replace_ack,
},
[SMSCB_S_WAIT_DELETE_ACK] = {
.name = "WAIT_DELETE_ACK",
- .in_event_mask = S(SMSCB_E_CBSP_DELETE_ACK) |
- S(SMSCB_E_CBSP_DELETE_NACK) |
- S(SMSCB_E_SBCAP_DELETE_ACK) |
- S(SMSCB_E_SBCAP_DELETE_NACK),
+ .in_event_mask = S(SMSCB_PEER_E_CBSP_DELETE_ACK) |
+ S(SMSCB_PEER_E_CBSP_DELETE_NACK) |
+ S(SMSCB_PEER_E_SBCAP_DELETE_ACK) |
+ S(SMSCB_PEER_E_SBCAP_DELETE_NACK),
.out_state_mask = S(SMSCB_S_DELETED),
.action = smscb_p_fsm_wait_delete_ack,
},
@@ -728,12 +706,12 @@
.name = "SMSCB-PEER",
.states = smscb_p_fsm_states,
.num_states = ARRAY_SIZE(smscb_p_fsm_states),
- .allstate_event_mask = S(SMSCB_E_DELETE) |
- S(SMSCB_E_SBCAP_WRITE_IND),
+ .allstate_event_mask = S(SMSCB_PEER_E_DELETE) |
+ S(SMSCB_PEER_E_SBCAP_WRITE_IND),
.allstate_action = smscb_p_fsm_allstate,
.timer_cb = smscb_p_fsm_timer_cb,
.log_subsys = DCBSP,
- .event_names = smscb_fsm_event_names,
+ .event_names = smscb_peer_fsm_event_names,
.cleanup = smscb_p_fsm_cleanup,
};
@@ -747,7 +725,7 @@
struct cbc_message_peer *mp;
struct osmo_fsm_inst *fi;
- fi = osmo_fsm_inst_alloc_child(&smscb_p_fsm, cbcmsg->fi, SMSCB_E_CHILD_DIED);
+ fi = osmo_fsm_inst_alloc_child(&smscb_p_fsm, cbcmsg->fi,
SMSCB_MSG_E_CHILD_DIED);
if (!fi)
return NULL;
/* include the peer name in the ID of the child FSM */
--
To view, visit
https://gerrit.osmocom.org/c/osmo-cbc/+/28826
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: I909474d1ff4ec7ed20aff0981da47074397df6cb
Gerrit-Change-Number: 28826
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged