#define closesocket(x) close(x)
#include <fcntl.h>
#else
+#pragma warning (disable:6386)
+/* These warnings need to be ignored warning in sdk header */
#include <Ws2tcpip.h>
+#pragma warning (default:6386)
#endif
*var = *val = NULL;
- if (!cfg->path) {
+ if (!cfg || !cfg->file) {
return 0;
}
char *encode_buf = NULL; /* used for url encoding of variables to make sure unsafe things stay out of the serialized copy */
int clen = 0;
+ if (!event || !event->headers)
+ return ESL_FAIL;
+
*str = NULL;
dlen = blocksize * 2;
*e++ = '\0';
}
do {
+ if (!p) {
+ break;
+ }
if ((next = strchr(p, ',')) != 0) {
*next++ = '\0';
}
#include <Ws2tcpip.h>
#pragma warning(pop)
#else
+/* work around for warnings in vs 2010 */
+#pragma warning (disable:6386)
#include <Ws2tcpip.h>
+#pragma warning (default:6386)
#endif
#else
#include <strings.h>
#define switch_is_valid_rate(_tmp) (_tmp == 8000 || _tmp == 12000 || _tmp == 16000 || _tmp == 24000 || _tmp == 32000 || _tmp == 11025 || _tmp == 22050 || _tmp == 44100 || _tmp == 48000)
+#ifdef _MSC_VER
+#pragma warning(disable:6011)
+#endif
static inline int switch_string_has_escaped_data(const char *in)
{
const char *i = strchr(in, '\\');
return 0;
}
+#ifdef _MSC_VER
+#pragma warning(default:6011)
+#endif
SWITCH_DECLARE(switch_status_t) switch_b64_encode(unsigned char *in, switch_size_t ilen, unsigned char *out, switch_size_t olen);
SWITCH_DECLARE(switch_size_t) switch_b64_decode(char *in, char *out, switch_size_t olen);
}
+#ifdef _MSC_VER
+#pragma warning(disable:6011)
+#endif
static inline char *switch_lc_strdup(const char *it)
{
char *dup;
return NULL;
}
+#ifdef _MSC_VER
+#pragma warning(default:6011)
+#endif
/*!
if (id == -1) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Unable to add tone_descriptor: %s, tone: %s. (too many tones)\n", name, tone_name);
return SWITCH_STATUS_FALSE;
-
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Adding tone_descriptor: %s, tone: %s(%d)\n", name, tone_name, id);}
+ }
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Adding tone_descriptor: %s, tone: %s(%d)\n", name, tone_name, id);
/* add elements to tone */
for (element = switch_xml_child(tone, "element"); element; element = switch_xml_next(element)) {
const char *freq1_attr = switch_xml_attr(element, "freq1");
name++;
name = switch_core_sprintf(ah->memory_pool, "%s ASR-%d", name, speech_channel_number);
} else {
- name = switch_core_sprintf(ah->memory_pool, "ASR-%d", name, speech_channel_number);
+ name = switch_core_sprintf(ah->memory_pool, "ASR-%d", speech_channel_number);
}
/* Allocate the channel */
argc = switch_separate_string(list, ':', argv, (sizeof(argv) / sizeof(argv[0])));
- for (i = 0; i < argc; i++) {
+ for (i = 0; (int)i < argc; i++) {
if (!cur || !strncmp(argv[i], cur, strlen(cur))) {
r_argv[0] = argv[i];
comp_callback(h, 1, r_argv, r_cols);