From d859a24f7d1dca2aed4e69330124e52d674d1589 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 22 Mar 2010 11:50:30 +0100 Subject: ipa-firmware: Fix the write out of the firmware parts Use the start address inside the header entry, the start is relative to the surrounding SDP record which is located in our base offset, when writing it out also ignore four bytes of something (crc?). --- openbsc/src/ipaccess/ipaccess-config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openbsc/src/ipaccess/ipaccess-config.c') diff --git a/openbsc/src/ipaccess/ipaccess-config.c b/openbsc/src/ipaccess/ipaccess-config.c index 33dd82a4f..93fe44236 100644 --- a/openbsc/src/ipaccess/ipaccess-config.c +++ b/openbsc/src/ipaccess/ipaccess-config.c @@ -496,7 +496,7 @@ static void dump_entry(struct sdp_header_item *sub_entry, int part, int fd) return; } - target = sub_entry->absolute_offset; + target = sub_entry->absolute_offset + ntohl(sub_entry->header_entry.start) + 4; if (lseek(fd, target, SEEK_SET) != target) { perror("seek failed"); close(out_fd); -- cgit v1.2.3