From e23bb54f9ad8ae8189d4f8245fb6eebc3a3d0e88 Mon Sep 17 00:00:00 2001 From: Mike Jerris Date: Wed, 27 Apr 2016 13:49:04 -0400 Subject: [PATCH] FS-9078: [sofia-sip] fix windows build of HEPv2/HEPv3 code --- .../libsofia-sip-ua/tport/tport_logging.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libs/sofia-sip/libsofia-sip-ua/tport/tport_logging.c b/libs/sofia-sip/libsofia-sip-ua/tport/tport_logging.c index efe7efe69e..6803b5559b 100644 --- a/libs/sofia-sip/libsofia-sip-ua/tport/tport_logging.c +++ b/libs/sofia-sip/libsofia-sip-ua/tport/tport_logging.c @@ -558,7 +558,7 @@ int tport_capt_msg_hepv2 (tport_t const *self, msg_t *msg, size_t n, hep_time.tv_usec = now.tv_usec; hep_time.captid = mr->mr_agent_id; - memcpy((void*)*buffer+buflen, &hep_time, sizeof(struct hep_timehdr)); + memcpy((char*)*buffer+buflen, &hep_time, sizeof(struct hep_timehdr)); buflen += sizeof(struct hep_timehdr); } @@ -596,12 +596,12 @@ int tport_capt_msg_hepv3 (tport_t const *self, msg_t *msg, size_t n, struct hep_generic *hg=NULL; unsigned int buflen=0, iplen=0,tlen=0, payload_len = 0; su_time_t now; - hep_chunk_ip4_t src_ip4, dst_ip4; + hep_chunk_ip4_t src_ip4 = { 0 }, dst_ip4 = { 0 }; hep_chunk_t payload_chunk; int orig_n = 0; #if SU_HAVE_IN6 - hep_chunk_ip6_t src_ip6, dst_ip6; + hep_chunk_ip6_t src_ip6 = { 0 }, dst_ip6 = { 0 }; #endif int eth_frame_len = 16000; @@ -771,26 +771,26 @@ int tport_capt_msg_hepv3 (tport_t const *self, msg_t *msg, size_t n, /* IPv4 */ if(su->su_family == AF_INET) { /* SRC IP */ - memcpy((void*) *buffer+buflen, &src_ip4, sizeof(struct hep_chunk_ip4)); + memcpy((char*) *buffer+buflen, &src_ip4, sizeof(struct hep_chunk_ip4)); buflen += sizeof(struct hep_chunk_ip4); - memcpy((void*) *buffer+buflen, &dst_ip4, sizeof(struct hep_chunk_ip4)); + memcpy((char*) *buffer+buflen, &dst_ip4, sizeof(struct hep_chunk_ip4)); buflen += sizeof(struct hep_chunk_ip4); } #if SU_HAVE_IN6 /* IPv6 */ else if(su->su_family == AF_INET6) { /* SRC IPv6 */ - memcpy((void*) *buffer+buflen, &src_ip4, sizeof(struct hep_chunk_ip6)); + memcpy((char*) *buffer+buflen, &src_ip4, sizeof(struct hep_chunk_ip6)); buflen += sizeof(struct hep_chunk_ip6); - memcpy((void*) *buffer+buflen, &dst_ip6, sizeof(struct hep_chunk_ip6)); + memcpy((char*) *buffer+buflen, &dst_ip6, sizeof(struct hep_chunk_ip6)); buflen += sizeof(struct hep_chunk_ip6); } #endif /* PAYLOAD CHUNK */ - memcpy((void*) *buffer+buflen, &payload_chunk, sizeof(struct hep_chunk)); + memcpy((char*) *buffer+buflen, &payload_chunk, sizeof(struct hep_chunk)); buflen += sizeof(struct hep_chunk); /* PAYLOAD */