diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-10-20 19:15:06 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-10-20 19:21:07 +0200 |
commit | def777ae7eba00512658148c27f1f234d14a2946 (patch) | |
tree | 6f8d6acd3e9129f3c07c0d8f53d55f03638e3eb0 /openbsc/contrib/a-link | |
parent | 8bde2ee61fcc04bbc76394f7115e333dcb966c81 (diff) |
lua: Check BSSMAP msgtypes in one function..
Diffstat (limited to 'openbsc/contrib/a-link')
-rw-r--r-- | openbsc/contrib/a-link/sccp-split-by-con.lua | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/openbsc/contrib/a-link/sccp-split-by-con.lua b/openbsc/contrib/a-link/sccp-split-by-con.lua index 34300b19b..1deed1927 100644 --- a/openbsc/contrib/a-link/sccp-split-by-con.lua +++ b/openbsc/contrib/a-link/sccp-split-by-con.lua @@ -25,30 +25,22 @@ do function check_failure(con) check_lu_reject(con) check_disconnect(con) - check_ass_failure(con) - check_cipher_reject(con) + check_failures(con) end -- cipher mode reject - function check_cipher_reject(con) + function check_failures(con) local msgtype = bssmap_msgtype_field() if not msgtype then return end - if tonumber(msgtype) == 89 then + msgtype = tonumber(msgtype) + if msgtype == 89 then + print("Cipher mode reject") con[4] = true - end - end - - -- check assignment failures - function check_ass_failure(con) - local msgtype = bssmap_msgtype_field() - if not msgtype then - return - end - - if tonumber(msgtype) == 0x03 then + elseif msgtype == 0x03 then + print("Assignment failure") con[4] = true end end |