aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/abis_nm.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2009-12-23 08:06:31 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2009-12-23 08:06:31 +0100
commit66e8219f962d22d96d1c1645280649d507ca2ae4 (patch)
tree21528f5b5ae2b09694b36b902925a6ae66b21b42 /openbsc/src/abis_nm.c
parente7ff91342e02cd1cd5af9dfbf7c822f55b228b4b (diff)
[sw_load] It turns out there is a header that needs to be read
The magic " SDP" is occuring twice in the file. The first time seems to be the file header and the second time it is with the payload. We will need to parse this somehow...
Diffstat (limited to 'openbsc/src/abis_nm.c')
-rw-r--r--openbsc/src/abis_nm.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/openbsc/src/abis_nm.c b/openbsc/src/abis_nm.c
index 64b87b570..98683d380 100644
--- a/openbsc/src/abis_nm.c
+++ b/openbsc/src/abis_nm.c
@@ -1341,6 +1341,11 @@ static int sw_activate(struct abis_nm_sw *sw)
return abis_nm_sendmsg(sw->bts, msg);
}
+static int parse_sdp_header(struct abis_nm_sw *sw)
+{
+ return -1;
+}
+
static int sw_open_file(struct abis_nm_sw *sw, const char *fname)
{
char file_id[12+1];
@@ -1380,8 +1385,11 @@ static int sw_open_file(struct abis_nm_sw *sw, const char *fname)
}
/* TODO: extract that from the filename or content */
- sw->file_id_len = 0;
- sw->file_version_len = 0;
+ rc = parse_sdp_header(sw);
+ if (rc < 0) {
+ fprintf(stderr, "Could not parse the ipaccess SDP header\n");
+ return -1;
+ }
break;
default:
/* We don't know how to treat them yet */