summaryrefslogtreecommitdiffstats
path: root/src/sim/file_codec.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-09-10 10:49:59 +0200
committerHarald Welte <laforge@gnumonks.org>2014-10-26 19:09:22 +0100
commitad41863b8d3f3ac7df0c34b2c7d342b864d944cc (patch)
treed8c28dce9b084dccc01b942e3fa3a69e927a7dbb /src/sim/file_codec.c
parenta0ba4d943816a10e78984d8bbca56fbdbdfe82bb (diff)
sim: add copyright notices and merge file_codec.c into core.c
Diffstat (limited to 'src/sim/file_codec.c')
-rw-r--r--src/sim/file_codec.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/sim/file_codec.c b/src/sim/file_codec.c
deleted file mode 100644
index 5bf5bc68..00000000
--- a/src/sim/file_codec.c
+++ /dev/null
@@ -1,34 +0,0 @@
-
-#include <unistd.h>
-
-#include <osmocom/core/talloc.h>
-#include <osmocom/sim/sim.h>
-
-struct osim_decoded_data *osim_file_decode(struct osim_file *file,
- int len, uint8_t *data)
-{
- struct osim_decoded_data *dd;
-
- if (!file->desc->ops.parse)
- return NULL;
-
- dd = talloc_zero(file, struct osim_decoded_data);
- dd->file = file;
-
- if (file->desc->ops.parse(dd, file->desc, len, data) < 0) {
- talloc_free(dd);
- return NULL;
- } else
- return dd;
-}
-
-struct msgb *osim_file_encode(const struct osim_file_desc *desc,
- const struct osim_decoded_data *data)
-{
- if (!desc->ops.encode)
- return NULL;
-
- return desc->ops.encode(desc, data);
-}
-
-