This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/26328 ) Change subject: abis_nm: use struct sdp_firmware from libosmocore ...................................................................... abis_nm: use struct sdp_firmware from libosmocore abis_nm locally declares its own struct for the ipaccess firmware header, even though libosmocore defines it as well. Lets use the definition from libosmocore. Change-Id: I69cb45fc40bd20ea2533cc8cd6a68363b59cc408 --- M src/osmo-bsc/abis_nm.c 1 file changed, 6 insertions(+), 10 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve daniel: Looks good to me, approved diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c index aeb4ba3..1c21bc2 100644 --- a/src/osmo-bsc/abis_nm.c +++ b/src/osmo-bsc/abis_nm.c @@ -51,6 +51,7 @@ #include <osmocom/bsc/bts.h> #include <osmocom/bsc/nm_common_fsm.h> #include <osmocom/gsm/bts_features.h> +#include <osmocom/bsc/ipaccess.h> #define OM_ALLOC_SIZE 1024 #define OM_HEADROOM_SIZE 128 @@ -1342,13 +1343,6 @@ return abis_nm_sendmsg(sw->bts, msg); } -struct sdp_firmware { - char magic[4]; - char more_magic[4]; - unsigned int header_length; - unsigned int file_length; -} __attribute__ ((packed)); - static int parse_sdp_header(struct abis_nm_sw *sw) { const struct gsm_abis_mo *mo = &sw->bts->mo; @@ -1368,13 +1362,15 @@ } if (firmware_header.more_magic[0] != 0x10 || - firmware_header.more_magic[1] != 0x02 || - firmware_header.more_magic[2] != 0x00 || - firmware_header.more_magic[3] != 0x00) { + firmware_header.more_magic[1] != 0x02) { LOGPMO(mo, DNM, LOGL_ERROR, "The more magic number is wrong.\n"); return -1; } + if (firmware_header.more_more_magic != 0x0000) { + LOGPMO(mo, DNM, LOGL_ERROR, "The more more magic number is wrong.\n"); + return -1; + } if (fstat(sw->fd, &stat) == -1) { LOGPMO(mo, DNM, LOGL_ERROR, "Could not stat the file.\n"); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/26328 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I69cb45fc40bd20ea2533cc8cd6a68363b59cc408 Gerrit-Change-Number: 26328 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann at sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de> Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-CC: pespin <pespin at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211123/89c24e98/attachment.htm>