<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
<WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
<DisableSpecificWarnings>4013;4101;4996;4267;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
</ClCompile>\r
<PreBuildEvent>\r
<SDLCheck>true</SDLCheck>\r
<AdditionalIncludeDirectories>$(SolutionDir)src\mod\endpoints\mod_gsmopen\libctb-0.16\include</AdditionalIncludeDirectories>\r
<DisableSpecificWarnings>4311;4302;4800;4101;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
</ClCompile>\r
<Link>\r
<SubSystem>Windows</SubSystem>\r
<PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<AdditionalIncludeDirectories>..\..\opus-1.1\win32;..\..\opus-1.1\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
</ClCompile>\r
<Link>\r
<SubSystem>Windows</SubSystem>\r
<PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;WIN64;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<AdditionalIncludeDirectories>..\..\opus-1.1\win32;..\..\opus-1.1\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
</ClCompile>\r
<Link>\r
<SubSystem>Windows</SubSystem>\r
<PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<AdditionalIncludeDirectories>..\..\opus-1.1\silk\fixed;..\..\opus-1.1\silk\float;..\..\opus-1.1\win32;..\..\opus-1.1\celt;..\..\opus-1.1\include</AdditionalIncludeDirectories>\r
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
</ClCompile>\r
<Link>\r
<SubSystem>Windows</SubSystem>\r
<PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;WIN64;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<AdditionalIncludeDirectories>..\..\opus-1.1\silk\fixed;..\..\opus-1.1\silk\float;..\..\opus-1.1\win32;..\..\opus-1.1\celt;..\..\opus-1.1\include</AdditionalIncludeDirectories>\r
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
</ClCompile>\r
<Link>\r
<SubSystem>Windows</SubSystem>\r
<AdditionalIncludeDirectories>..\..\opus-1.1\silk\;..\..\opus-1.1\win32;..\..\opus-1.1\celt;..\..\opus-1.1\include</AdditionalIncludeDirectories>\r
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
<DisableSpecificWarnings>4244;4133;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
</ClCompile>\r
<Link>\r
<SubSystem>Windows</SubSystem>\r
<AdditionalIncludeDirectories>..\..\opus-1.1\silk\;..\..\opus-1.1\win32;..\..\opus-1.1\celt;..\..\opus-1.1\include</AdditionalIncludeDirectories>\r
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
<DisableSpecificWarnings>4244;4133;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
</ClCompile>\r
<Link>\r
<SubSystem>Windows</SubSystem>\r
<PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<AdditionalIncludeDirectories>..\..\opus-1.1\silk;..\..\opus-1.1\silk\fixed;..\..\opus-1.1\win32;..\..\opus-1.1\celt;..\..\opus-1.1\include</AdditionalIncludeDirectories>\r
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
</ClCompile>\r
<Link>\r
<SubSystem>Windows</SubSystem>\r
<PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;WIN64;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<AdditionalIncludeDirectories>..\..\opus-1.1\silk;..\..\opus-1.1\silk\fixed;..\..\opus-1.1\win32;..\..\opus-1.1\celt;..\..\opus-1.1\include</AdditionalIncludeDirectories>\r
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
</ClCompile>\r
<Link>\r
<SubSystem>Windows</SubSystem>\r
<FunctionLevelLinking>true</FunctionLevelLinking>\r
<WarningLevel>Level3</WarningLevel>\r
<SuppressStartupBanner>true</SuppressStartupBanner>\r
- <DisableSpecificWarnings>4496;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+ <DisableSpecificWarnings>4996;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
</ClCompile>\r
<ResourceCompile>\r
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<FunctionLevelLinking>true</FunctionLevelLinking>\r
<WarningLevel>Level3</WarningLevel>\r
<SuppressStartupBanner>true</SuppressStartupBanner>\r
- <DisableSpecificWarnings>4496;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+ <DisableSpecificWarnings>4996;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
</ClCompile>\r
<ResourceCompile>\r
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
<WarningLevel>Level3</WarningLevel>\r
<SuppressStartupBanner>true</SuppressStartupBanner>\r
- <DisableSpecificWarnings>4496;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+ <DisableSpecificWarnings>4996;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
</ClCompile>\r
<ResourceCompile>\r
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
<WarningLevel>Level3</WarningLevel>\r
<SuppressStartupBanner>true</SuppressStartupBanner>\r
- <DisableSpecificWarnings>4496;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+ <DisableSpecificWarnings>4996;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
</ClCompile>\r
<ResourceCompile>\r
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
<WarningLevel>Level3</WarningLevel>\r
<SuppressStartupBanner>true</SuppressStartupBanner>\r
- <DisableSpecificWarnings>4496;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+ <DisableSpecificWarnings>4996;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
</ClCompile>\r
<ResourceCompile>\r
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
<WarningLevel>Level3</WarningLevel>\r
<SuppressStartupBanner>true</SuppressStartupBanner>\r
- <DisableSpecificWarnings>4496;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+ <DisableSpecificWarnings>4996;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
</ClCompile>\r
<ResourceCompile>\r
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<FunctionLevelLinking>true</FunctionLevelLinking>\r
<WarningLevel>Level3</WarningLevel>\r
<SuppressStartupBanner>true</SuppressStartupBanner>\r
- <DisableSpecificWarnings>4496;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+ <DisableSpecificWarnings>4996;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
</ClCompile>\r
<ResourceCompile>\r
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<FunctionLevelLinking>true</FunctionLevelLinking>\r
<WarningLevel>Level3</WarningLevel>\r
<SuppressStartupBanner>true</SuppressStartupBanner>\r
- <DisableSpecificWarnings>4496;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+ <DisableSpecificWarnings>4996;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
</ClCompile>\r
<ResourceCompile>\r
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
agent_session = switch_core_session_locate(h->agent_uuid);
if (agent_session) {
switch_channel_t *agent_channel = switch_core_session_get_channel(agent_session);
- switch_event_t *event;
+ switch_event_t *e;
const char *cc_warning_tone = switch_channel_get_variable(agent_channel, "cc_warning_tone");
switch_channel_set_variable(agent_channel, "cc_side", "agent");
switch_channel_set_variable(agent_channel, "cc_member_session_uuid", h->member_session_uuid);
/* Playback this to the agent */
- if (cc_warning_tone && switch_event_create(&event, SWITCH_EVENT_COMMAND) == SWITCH_STATUS_SUCCESS) {
- switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "call-command", "execute");
- switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "execute-app-name", "playback");
- switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "execute-app-arg", cc_warning_tone);
- switch_core_session_queue_private_event(agent_session, &event, SWITCH_TRUE);
+ if (cc_warning_tone && switch_event_create(&e, SWITCH_EVENT_COMMAND) == SWITCH_STATUS_SUCCESS) {
+ switch_event_add_header_string(e, SWITCH_STACK_BOTTOM, "call-command", "execute");
+ switch_event_add_header_string(e, SWITCH_STACK_BOTTOM, "execute-app-name", "playback");
+ switch_event_add_header_string(e, SWITCH_STACK_BOTTOM, "execute-app-arg", cc_warning_tone);
+ switch_core_session_queue_private_event(agent_session, &e, SWITCH_TRUE);
}
status = SWITCH_STATUS_SUCCESS;
lp = new_list;
for (param = switch_xml_child(list, "node"); param; param = param->next) {
- char *name = (char *) switch_xml_attr_soft(param, "name");
+ char *name_attr = (char *) switch_xml_attr_soft(param, "name");
char *weight_val = (char *) switch_xml_attr_soft(param, "weight");
int tmp;
}
switch_zmalloc(node, sizeof(*node));
- node->name = strdup(name);
+ node->name = strdup(name_attr);
node->wval = tmp;
if (np) {
caller_profile->callee_id_number = num;
if (switch_event_create(&event, SWITCH_EVENT_CALL_UPDATE) == SWITCH_STATUS_SUCCESS) {
- const char *uuid = switch_channel_get_partner_uuid(channel);
+ const char *partner_uuid = switch_channel_get_partner_uuid(channel);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Direction", "RECV");
- if (uuid) {
- switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Bridged-To", uuid);
+ if (partner_uuid) {
+ switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Bridged-To", partner_uuid);
}
switch_channel_event_set_data(channel, event);
switch_event_fire(&event);
if (context->file && switch_test_flag(handle, SWITCH_FILE_DATA_SHORT)) { /* TODO handle other data type flags */
switch_size_t len;
uint16_t buf[SWITCH_RECOMMENDED_BUFFER_SIZE] = { 0 };
- switch_status_t status;
+ switch_status_t stat;
switch_file_handle_t fh = { 0 };
- if ((status = switch_core_file_open(&fh, context->file, handle->channels, handle->samplerate,
+ if ((stat = switch_core_file_open(&fh, context->file, handle->channels, handle->samplerate,
SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT, NULL)) == SWITCH_STATUS_SUCCESS) {
do {
len = SWITCH_RECOMMENDED_BUFFER_SIZE / handle->channels;
- if ((status = switch_core_file_read(&fh, buf, &len)) == SWITCH_STATUS_SUCCESS) {
- status = switch_core_file_write(&context->fh, buf, &len);
+ if ((stat = switch_core_file_read(&fh, buf, &len)) == SWITCH_STATUS_SUCCESS) {
+ stat = switch_core_file_write(&context->fh, buf, &len);
}
- } while (status == SWITCH_STATUS_SUCCESS);
+ } while (stat == SWITCH_STATUS_SUCCESS);
switch_core_file_close(&fh);
switch_file_remove(context->file, handle->memory_pool);
}
if ((l = switch_channel_get_variable(channel, "page_chunk_size"))) {
- uint32_t tmp = switch_atoui(l);
+ uint32_t chunk = switch_atoui(l);
- if (tmp > 0) {
- chunk_size = tmp;
+ if (chunk > 0) {
+ chunk_size = chunk;
}
}
<AdditionalOptions> /J</AdditionalOptions>\r
<PrecompiledHeader>\r
</PrecompiledHeader>\r
- <DisableSpecificWarnings>4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+ <DisableSpecificWarnings>6031;4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
</ClCompile>\r
<Link>\r
<RandomizedBaseAddress>false</RandomizedBaseAddress>\r
<AdditionalOptions> /J</AdditionalOptions>\r
<PrecompiledHeader>\r
</PrecompiledHeader>\r
- <DisableSpecificWarnings>4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+ <DisableSpecificWarnings>6031;4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
</ClCompile>\r
<Link>\r
<RandomizedBaseAddress>false</RandomizedBaseAddress>\r
<AdditionalOptions> /J</AdditionalOptions>\r
<PrecompiledHeader>\r
</PrecompiledHeader>\r
- <DisableSpecificWarnings>4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+ <DisableSpecificWarnings>6031;4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
</ClCompile>\r
<Link>\r
<RandomizedBaseAddress>false</RandomizedBaseAddress>\r
<AdditionalOptions> /J</AdditionalOptions>\r
<PrecompiledHeader>\r
</PrecompiledHeader>\r
- <DisableSpecificWarnings>4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+ <DisableSpecificWarnings>6031;4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
</ClCompile>\r
<Link>\r
<RandomizedBaseAddress>false</RandomizedBaseAddress>\r
struct xml_helper *h = (struct xml_helper *) pArg;
switch_xml_t x_out;
int c_off = 0;
- char exp_buf[128] = "";
+ char exp_buf[128] = { 0 };
switch_time_exp_t tm;
switch_time_t etime = 0;
char atime[128] = "";
void *val = NULL;
const void *key;
switch_ssize_t keylen;
- limit_hash_item_t *item = NULL;
switch_core_hash_this(hi, &key, &keylen, &val);
} else {
switch_cond_next();
}
- } while (wrote != realsize && (x == -1 && (errno == EAGAIN || errno == EINTR)) && --sanity);
+ } while ((unsigned)wrote != realsize && (x == -1 && (errno == EAGAIN || errno == EINTR)) && --sanity);
if (wrote != (int) realsize) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Short write! fd:%d %d out of %d [%s]\n", client->fd, wrote, realsize, strerror(errno));
/* we're going to make an assumption that final billing is done here. So we'll see how this goes. */
/* round total billed up as required */
- rounded_billed = ceilf(nibble_data->total * rounding_factor) / rounding_factor;
+ rounded_billed = ceilf((float)(nibble_data->total * rounding_factor)) / rounding_factor;
if (rounded_billed < minimum_charge)
{
</ItemDefinitionGroup>\r
<ItemGroup>\r
<ClCompile Include="mod_redis.c" />\r
- <ClCompile Include="credis.c" />\r
+ <ClCompile Include="credis.c">\r
+ <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4005;4389;4133;4244;4706;4306;4996;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+ <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4005;4389;4133;4244;4706;4306;4996;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+ <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4005;4389;4133;4244;4706;4306;4996;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+ <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4005;4389;4133;4244;4706;4306;4996;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+ </ClCompile>\r
</ItemGroup>\r
<ItemGroup>\r
<ProjectReference Include="..\..\..\..\w32\Library\FreeSwitchCore.2015.vcxproj">\r
char *pattern = NULL;
char *app = NULL;
char *argument = NULL;
- char *expression = NULL, expression_buf[1024] = "";
+ char *expression = NULL, expression_buf[1024] = { 0 };
char substituted[2048] = "";
const char *field_data = caller_profile->destination_number;
int proceed = 0;
char *proto = MDL_CHAT_PROTO;
char *pproto = NULL, *ffrom = NULL;
char *hint;
- switch_event_t *event;
char *from_user, *from_host;
#ifdef AUTO_REPLY
if (profile->auto_reply) {
<RuntimeTypeInfo>true</RuntimeTypeInfo>\r
<WarningLevel>Level3</WarningLevel>\r
<SuppressStartupBanner>true</SuppressStartupBanner>\r
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
<AdditionalOptions>/wd4290 /wd4996 %(AdditionalOptions)</AdditionalOptions>\r
<DisableSpecificWarnings>4838;4267;4101;4244;4554;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
</ClCompile>\r
interval = codec->implementation->microseconds_per_packet / 1000;
} else {
const char *var;
- char *modname = NULL;
+ char *codec_modname = NULL;
if ((var = switch_channel_get_variable(channel, "loopback_initial_codec"))) {
char *dup = switch_core_session_strdup(session, var);
uint32_t bit, channels;
- iananame = switch_parse_codec_buf(dup, &interval, &rate, &bit, &channels, &modname);
+ iananame = switch_parse_codec_buf(dup, &interval, &rate, &bit, &channels, &codec_modname);
}
}
switch_mutex_lock(rsession->tech_pvt->readbuf_mutex);
- if (rsession->tech_pvt->maxlen && switch_buffer_inuse(rsession->tech_pvt->readbuf) > rsession->tech_pvt->maxlen * 40) {
+ if (rsession->tech_pvt->maxlen && switch_buffer_inuse(rsession->tech_pvt->readbuf) > (switch_size_t)(rsession->tech_pvt->maxlen * 40)) {
rsession->tech_pvt->over_size++;
} else {
rsession->tech_pvt->over_size = 0;
}
switch_mutex_lock(rsession->tech_pvt->video_readbuf_mutex);
- if (rsession->tech_pvt->video_maxlen && switch_buffer_inuse(rsession->tech_pvt->video_readbuf) > rsession->tech_pvt->video_maxlen * 100) {
+ if (rsession->tech_pvt->video_maxlen && switch_buffer_inuse(rsession->tech_pvt->video_readbuf) > (switch_size_t)(rsession->tech_pvt->video_maxlen * 100)) {
rsession->tech_pvt->video_over_size++;
} else {
rsession->tech_pvt->video_over_size = 0;
char *dupvar = NULL;
char *watch_headers[10];
unsigned int numhdrs = 0;
- int i = 0;
+ unsigned int i = 0;
dupvar = switch_core_session_strdup(session, hval);
numhdrs = switch_separate_string(dupvar, ',', watch_headers, switch_arraylen(watch_headers));
if (numhdrs) {
{
struct tm tm = {0};
time_t now = switch_epoch_time_now(NULL);
- uint32_t callsequence = (now - mod_sofia_globals.presence_epoch) * SOFIA_PRESENCE_COLLISION_DELTA;
+ uint32_t callsequence = (uint32_t)((now - mod_sofia_globals.presence_epoch) * SOFIA_PRESENCE_COLLISION_DELTA);
if (!mod_sofia_globals.presence_year || callsequence >= SOFIA_PRESENCE_ROLLOVER_YEAR) {
switch_mutex_lock(mod_sofia_globals.mutex);
if (tm.tm_year != mod_sofia_globals.presence_year) {
mod_sofia_globals.presence_epoch = (uint32_t)now - (tm.tm_yday * 86400) - (tm.tm_hour * 60 * 60) - (tm.tm_min * 60) - tm.tm_sec;
mod_sofia_globals.presence_year = tm.tm_year;
- callsequence = ((uint32_t)now - mod_sofia_globals.presence_epoch) * SOFIA_PRESENCE_COLLISION_DELTA;
+ callsequence = (uint32_t)(((uint32_t)now - mod_sofia_globals.presence_epoch) * SOFIA_PRESENCE_COLLISION_DELTA);
}
switch_mutex_unlock(mod_sofia_globals.mutex);
int result;
int range = max + 1;
- srand((intptr_t) switch_thread_self() + switch_micro_time_now());
+ srand((unsigned)((intptr_t) switch_thread_self() + switch_micro_time_now()));
result = (int)((double)rand() / (((double)RAND_MAX + (double)1) / range));
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG9, "Generated random %ld, max is %d\n", (long) result, max);
free(sql);
//if (!sofia_glue_execute_sql2str(profile, profile->dbh_mutex, sql, np, nplen)) {
- if (zstr(np) || (profile->max_auth_validity != 0 && cb.last_nc >= profile->max_auth_validity )) {
+ if (zstr(np) || (profile->max_auth_validity != 0 && (uint32_t)cb.last_nc >= profile->max_auth_validity )) {
sql = switch_mprintf("delete from sip_authentication where nonce='%q'", nonce);
sofia_glue_execute_sql(profile, &sql, SWITCH_TRUE);
ret = AUTH_STALE;
memcpy(&mreq.ipv6mr_multiaddr, &((struct sockaddr_in6 *)mcast_addr->ai_addr)->sin6_addr, sizeof(struct in6_addr));
mreq.ipv6mr_interface = 0;
- setsockopt(handle->sock, IPPROTO_IPV6, IPV6_JOIN_GROUP, &mreq, sizeof(mreq));
+ setsockopt(handle->sock, IPPROTO_IPV6, IPV6_JOIN_GROUP, (const char *)&mreq, sizeof(mreq));
if (bind(handle->sock, (struct sockaddr *) &handle->recv_addr6, sizeof(handle->recv_addr6)) < 0) {
printf("FUCK (%s) %s\n", host, strerror(errno));
</PrecompiledHeader>\r
<AdditionalIncludeDirectories>$(SolutionDir)\src\include;%(AdditionalIncludeDirectories);..\..\..\..\libs\openssl-$(OpenSSLVersion)\include;$(ProjectDir)..\..\..\..\libs\pthreads-w32-2-9-1;.\;.\mcast</AdditionalIncludeDirectories>\r
<PreprocessorDefinitions>_TIMESPEC_DEFINED;_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <DisableSpecificWarnings>6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+ <DisableSpecificWarnings>6053;6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
</ClCompile>\r
<Link>\r
<RandomizedBaseAddress>false</RandomizedBaseAddress>\r
</PrecompiledHeader>\r
<AdditionalIncludeDirectories>$(SolutionDir)\src\include;%(AdditionalIncludeDirectories);..\..\..\..\libs\openssl-$(OpenSSLVersion)\include;$(ProjectDir)..\..\..\..\libs\pthreads-w32-2-9-1;.\;.\mcast</AdditionalIncludeDirectories>\r
<PreprocessorDefinitions>_TIMESPEC_DEFINED;_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <DisableSpecificWarnings>6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+ <DisableSpecificWarnings>6053;6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
</ClCompile>\r
<Link>\r
<RandomizedBaseAddress>false</RandomizedBaseAddress>\r
</PrecompiledHeader>\r
<AdditionalIncludeDirectories>$(SolutionDir)\src\include;%(AdditionalIncludeDirectories);..\..\..\..\libs\openssl-$(OpenSSLVersion)\include;$(ProjectDir)..\..\..\..\libs\pthreads-w32-2-9-1;.\;.\mcast</AdditionalIncludeDirectories>\r
<PreprocessorDefinitions>_TIMESPEC_DEFINED;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <DisableSpecificWarnings>6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+ <DisableSpecificWarnings>6053;6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
</ClCompile>\r
<Link>\r
<RandomizedBaseAddress>false</RandomizedBaseAddress>\r
</PrecompiledHeader>\r
<AdditionalIncludeDirectories>$(SolutionDir)\src\include;%(AdditionalIncludeDirectories);..\..\..\..\libs\openssl-$(OpenSSLVersion)\include;$(ProjectDir)..\..\..\..\libs\pthreads-w32-2-9-1;.\;.\mcast</AdditionalIncludeDirectories>\r
<PreprocessorDefinitions>_TIMESPEC_DEFINED;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <DisableSpecificWarnings>6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+ <DisableSpecificWarnings>6053;6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
</ClCompile>\r
<Link>\r
<RandomizedBaseAddress>false</RandomizedBaseAddress>\r
switch_mutex_lock(globals.jsock_mutex);
+ switch_assert(jsock);
+
if ((jp = switch_core_hash_find(globals.jsock_hash, jsock->uuid_str))) {
if (jp == jsock) {
proceed = 0;
{
switch_http_request_t request = { 0 };
switch_stream_handle_t stream = { 0 };
- char *data = NULL;
+ char *err = NULL;
char *ext;
verto_vhost_t *vhost;
switch_bool_t keepalive;
memcpy(buffer, jsock->ws.buffer + request.bytes_read, bytes);
}
- while(bytes < request.content_length) {
+ while(bytes < (switch_ssize_t)request.content_length) {
len = request.content_length - bytes;
if ((len = ws_raw_read(&jsock->ws, buffer + bytes, len, jsock->ws.block)) < 0) {
switch_http_free_request(&request);
err:
- data = "HTTP/1.1 500 Internal Server Error\r\n"
+ err = "HTTP/1.1 500 Internal Server Error\r\n"
"Content-Length: 0\r\n\r\n";
- ws_raw_write(&jsock->ws, data, strlen(data));
+ ws_raw_write(&jsock->ws, err, strlen(err));
error:
return;
switch_core_session_t *session;
if ((session = switch_core_session_locate(call_id))) {
verto_pvt_t *tech_pvt = switch_core_session_get_private_class(session, SWITCH_PVT_SECONDARY);
- jsock_t *jsock;
if ((jsock = get_jsock(tech_pvt->jsock_uuid))) {
jsock_queue_event(jsock, &msg, SWITCH_FALSE);
switch_sockaddr_t *sa;
switch_port_t port = 8084;
listener_t *listener;
- int argc = 0, x = 0;
+ unsigned int argc = 0, x = 0;
char *argv[80] = { 0 };
char *hosts[50] = { 0 };
unsigned int hosts_count = 0;
const char *artist = NULL, *title = NULL;
if (fd > -1) {
- char *p;
+ char *pb;
if (switch_fd_read_line(fd, path_buf, sizeof(path_buf))) {
- if ((p = strchr(path_buf, '\r')) || (p = strchr(path_buf, '\n'))) {
- *p = '\0';
+ if ((pb = strchr(path_buf, '\r')) || (pb = strchr(path_buf, '\n'))) {
+ *pb = '\0';
}
} else {
close(fd);
if (zstr(name)) {
for (directory = switch_xml_child(cfg, "directory"); directory; directory = directory->next) {
- char *name = (char *) switch_xml_attr(directory, "name");
+ char *name_attr = (char *) switch_xml_attr(directory, "name");
char *path = (char *) switch_xml_attr(directory, "path");
- launch_thread(name, path, directory);
+ launch_thread(name_attr, path, directory);
x++;
}
} else if ((directory = switch_xml_find_child(cfg, "directory", "name", name))) {
if (!codec->implementation || !switch_core_codec_ready(codec)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Codec is not initialized!\n");
abort();
- return SWITCH_STATUS_NOT_INITALIZED;
+ //return SWITCH_STATUS_NOT_INITALIZED;
}