summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-01-31 22:30:22 +0100
committerHarald Welte <laforge@gnumonks.org>2012-01-31 22:30:22 +0100
commit79e233f14ae363978e0604c045b05a46a7e8ff72 (patch)
tree9c7adec9e3e32c24baac1b8d83ec86d9d6395c26 /src
parent7580dc543022e3f6e84775dce9c9665a907e6ec9 (diff)
osmo_util: add new asn_val() function
Diffstat (limited to 'src')
-rw-r--r--src/osmo_util.erl8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/osmo_util.erl b/src/osmo_util.erl
index 584f9ec..a1c70fe 100644
--- a/src/osmo_util.erl
+++ b/src/osmo_util.erl
@@ -25,6 +25,7 @@
-export([tuple_walk/3, tuple_walk_print_cb/3]).
-export([make_prim/4, make_prim/3]).
-export([pointcode2int/1, pointcode2int/2, pointcode_fmt/2]).
+-export([asn_val/1]).
-include("osmo_util.hrl").
@@ -175,3 +176,10 @@ pointcode_fmt(ansi, PcInt) ->
pointcode_fmt(ttc, PcInt) ->
<<A:5, B:4, C:7>> = <<PcInt:16/big>>,
{pointcode, ttc, {A, B, C}}.
+
+asn_val(undefined) ->
+ asn1_NOVALUE;
+asn_val([]) ->
+ asn1_NOVALUE;
+asn_val(Foo) ->
+ Foo.