Change in osmo-msc[master]: vlr_lu_fsm.c: assert for invalid events

osmith gerrit-no-reply at lists.osmocom.org
Fri May 10 12:42:58 UTC 2019


osmith has uploaded this change for review. ( https://gerrit.osmocom.org/13965


Change subject: vlr_lu_fsm.c: assert for invalid events
......................................................................

vlr_lu_fsm.c: assert for invalid events

In state machine callback functions, instead of logging an error when
an invalid event arrives, do OSMO_ASSERT(0).

Change-Id: If5363ae37b414a0ac195e5f89664c75cbad0bb21
---
M src/libvlr/vlr_lu_fsm.c
1 file changed, 6 insertions(+), 12 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/65/13965/1

diff --git a/src/libvlr/vlr_lu_fsm.c b/src/libvlr/vlr_lu_fsm.c
index 27196d8..15ab88c 100644
--- a/src/libvlr/vlr_lu_fsm.c
+++ b/src/libvlr/vlr_lu_fsm.c
@@ -1086,8 +1086,7 @@
 		_start_lu_main(fi);
 		break;
 	default:
-		LOGPFSML(fi, LOGL_ERROR, "event without effect: %s\n",
-			 osmo_fsm_event_name(fi->fsm, event));
+		OSMO_ASSERT(0);
 		break;
 	}
 }
@@ -1104,8 +1103,7 @@
 		vlr_loc_upd_want_imsi(fi);
 		break;
 	default:
-		LOGPFSML(fi, LOGL_ERROR, "event without effect: %s\n",
-			 osmo_fsm_event_name(fi->fsm, event));
+		OSMO_ASSERT(0);
 		break;
 	}
 }
@@ -1170,8 +1168,7 @@
 		vlr_loc_upd_node1(fi);
 		break;
 	default:
-		LOGPFSML(fi, LOGL_ERROR, "event without effect: %s\n",
-			 osmo_fsm_event_name(fi->fsm, event));
+		OSMO_ASSERT(0);
 		break;
 	}
 }
@@ -1213,8 +1210,7 @@
 		}
 		break;
 	default:
-		LOGPFSML(fi, LOGL_ERROR, "event without effect: %s\n",
-			 osmo_fsm_event_name(fi->fsm, event));
+		OSMO_ASSERT(0);
 		break;
 	}
 }
@@ -1264,8 +1260,7 @@
 		lu_fsm_failure(fi, cause);
 		break;
 	default:
-		LOGPFSML(fi, LOGL_ERROR, "event without effect: %s\n",
-			 osmo_fsm_event_name(fi->fsm, event));
+		OSMO_ASSERT(0);
 		break;
 	}
 }
@@ -1297,8 +1292,7 @@
 		lu_fsm_failure(fi, cause);
 		break;
 	default:
-		LOGPFSML(fi, LOGL_ERROR, "event without effect: %s\n",
-			 osmo_fsm_event_name(fi->fsm, event));
+		OSMO_ASSERT(0);
 		break;
 	}
 }

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If5363ae37b414a0ac195e5f89664c75cbad0bb21
Gerrit-Change-Number: 13965
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190510/8920be1f/attachment.html>


More information about the gerrit-log mailing list