mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
ipa-firmware: Add the entry first and then seek
The sub entry might not be a SDP file so it is best to add the read entry, add it to the list and then attempt to recursively parse this one.
This commit is contained in:
@@ -115,6 +115,10 @@ int ipaccess_analyze_file(int fd, const unsigned int st_size, const unsigned int
|
||||
return -1;
|
||||
}
|
||||
|
||||
header_entry = talloc_zero(header, struct sdp_header_item);
|
||||
header_entry->header_entry = entry;
|
||||
llist_add(&header_entry->entry, &header->header_list);
|
||||
|
||||
/* now we need to find the SDP file... */
|
||||
offset = ntohl(entry.start) + 4 + base_offset;
|
||||
if (lseek(fd, offset, SEEK_SET) != offset) {
|
||||
@@ -122,9 +126,6 @@ int ipaccess_analyze_file(int fd, const unsigned int st_size, const unsigned int
|
||||
return -1;
|
||||
}
|
||||
|
||||
header_entry = talloc_zero(header, struct sdp_header_item);
|
||||
header_entry->header_entry = entry;
|
||||
llist_add(&header_entry->entry, &header->header_list);
|
||||
|
||||
ipaccess_analyze_file(fd, ntohl(entry.length), offset, list);
|
||||
}
|
||||
|
Reference in New Issue
Block a user