From d5484651ce473636fcfb5ecc2a4289c4645319ca Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Thu, 17 May 2012 06:13:32 +0000 Subject: [PATCH] squelch a Windows VS warning about null termination on the ZID According Jeff Lenk, Windows Visual Studio doesn't understand that people use the char type for non-null-terminated byte arrays, so it throws a warning about this that causes the build to fail on Windows. As the initial value for the ZID doesn't really matter here one iota, just null-terminate it on Windows. --- src/switch_rtp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/switch_rtp.c b/src/switch_rtp.c index 9c42520ff9..c4030148aa 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -73,7 +73,11 @@ typedef srtp_hdr_t rtp_hdr_t; #ifdef ENABLE_ZRTP #include "zrtp.h" static zrtp_global_t *zrtp_global; +#ifndef WIN32 static zrtp_zid_t zid = { "FreeSWITCH01" }; +#else +static zrtp_zid_t zid = { "FreeSWITCH0\0" }; +#endif static int zrtp_on = 0; #define ZRTP_MITM_TRIES 100 #endif