static int rtpdebug = 0; /* Are we debugging? */
static struct sockaddr_in rtpdebugaddr; /* Debug packets to/from this host */
#ifdef SO_NO_CHECK
-static int checksums = 1;
+static int nochecksums = 0;
#endif
/* The value of each payload format mapping: */
flags = fcntl(s, F_GETFL);
fcntl(s, F_SETFL, flags | O_NONBLOCK);
#ifdef SO_NO_CHECK
- if (checksums) {
- setsockopt(s, SOL_SOCKET, SO_NO_CHECK, &checksums, sizeof(checksums));
- }
+ if (nochecksums)
+ setsockopt(s, SOL_SOCKET, SO_NO_CHECK, &nochecksums, sizeof(nochecksums));
#endif
}
return s;
rtpstart = 5000;
rtpend = 31000;
-#ifdef SO_NO_CHECK
- checksums = 1;
-#endif
cfg = ast_config_load("rtp.conf");
if (cfg) {
if ((s = ast_variable_retrieve(cfg, "general", "rtpstart"))) {
}
if ((s = ast_variable_retrieve(cfg, "general", "rtpchecksums"))) {
#ifdef SO_NO_CHECK
- if (ast_true(s))
- checksums = 1;
+ if (ast_false(s))
+ nochecksums = 1;
else
- checksums = 0;
+ nochecksums = 0;
#else
- if (ast_true(s))
+ if (ast_false(s))
ast_log(LOG_WARNING, "Disabling RTP checksums is not supported on this operating system!\n");
#endif
}