mirror of git://git.sysmocom.de/ofono
Fix: Use a union for other address objects
This commit is contained in:
parent
f86c13ce8b
commit
962d2fff50
|
@ -1202,7 +1202,7 @@ static gboolean parse_dataobj_other_address(
|
||||||
|
|
||||||
data = comprehension_tlv_iter_get_data(iter);
|
data = comprehension_tlv_iter_get_data(iter);
|
||||||
oa->type = data[0];
|
oa->type = data[0];
|
||||||
memcpy(oa->addr, data + 1, len - 1);
|
memcpy(&oa->addr, data + 1, len - 1);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -562,7 +562,11 @@ struct stk_card_reader_id {
|
||||||
* So the maximum size is 16 (for ipv6).
|
* So the maximum size is 16 (for ipv6).
|
||||||
*/
|
*/
|
||||||
struct stk_other_address {
|
struct stk_other_address {
|
||||||
unsigned char addr[16];
|
union {
|
||||||
|
/* Network Byte Order */
|
||||||
|
unsigned int ipv4;
|
||||||
|
unsigned char ipv6[16];
|
||||||
|
} addr;
|
||||||
unsigned char type;
|
unsigned char type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue