mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-12 23:40:04 +00:00
FS-7966: fix more msvc 2015 warnings.
This commit is contained in:
parent
4b8587a863
commit
5c59a0159d
@ -90,7 +90,7 @@
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4013;4101;4996;4267;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<PreBuildEvent>
|
||||
|
@ -91,6 +91,7 @@
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)src\mod\endpoints\mod_gsmopen\libctb-0.16\include</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4311;4302;4800;4101;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
@ -97,6 +97,7 @@
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\opus-1.1\win32;..\..\opus-1.1\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@ -124,6 +125,7 @@
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;WIN64;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\opus-1.1\win32;..\..\opus-1.1\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
@ -94,6 +94,7 @@
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\opus-1.1\silk\fixed;..\..\opus-1.1\silk\float;..\..\opus-1.1\win32;..\..\opus-1.1\celt;..\..\opus-1.1\include</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@ -121,6 +122,7 @@
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;WIN64;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\opus-1.1\silk\fixed;..\..\opus-1.1\silk\float;..\..\opus-1.1\win32;..\..\opus-1.1\celt;..\..\opus-1.1\include</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
@ -93,6 +93,7 @@
|
||||
<AdditionalIncludeDirectories>..\..\opus-1.1\silk\;..\..\opus-1.1\win32;..\..\opus-1.1\celt;..\..\opus-1.1\include</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<DisableSpecificWarnings>4244;4133;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@ -109,6 +110,7 @@
|
||||
<AdditionalIncludeDirectories>..\..\opus-1.1\silk\;..\..\opus-1.1\win32;..\..\opus-1.1\celt;..\..\opus-1.1\include</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<DisableSpecificWarnings>4244;4133;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
@ -93,6 +93,7 @@
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\opus-1.1\silk;..\..\opus-1.1\silk\fixed;..\..\opus-1.1\win32;..\..\opus-1.1\celt;..\..\opus-1.1\include</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@ -120,6 +121,7 @@
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;WIN64;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\opus-1.1\silk;..\..\opus-1.1\silk\fixed;..\..\opus-1.1\win32;..\..\opus-1.1\celt;..\..\opus-1.1\include</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
@ -140,7 +140,7 @@
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DisableSpecificWarnings>4496;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4996;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
@ -167,7 +167,7 @@
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DisableSpecificWarnings>4496;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4996;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
@ -193,7 +193,7 @@
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DisableSpecificWarnings>4496;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4996;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
@ -219,7 +219,7 @@
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DisableSpecificWarnings>4496;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4996;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
@ -245,7 +245,7 @@
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DisableSpecificWarnings>4496;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4996;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
@ -271,7 +271,7 @@
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DisableSpecificWarnings>4496;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4996;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
@ -298,7 +298,7 @@
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DisableSpecificWarnings>4496;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4996;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
@ -325,7 +325,7 @@
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DisableSpecificWarnings>4496;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4996;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
|
@ -1598,7 +1598,7 @@ static void *SWITCH_THREAD_FUNC outbound_agent_thread_run(switch_thread_t *threa
|
||||
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");
|
||||
@ -1609,11 +1609,11 @@ static void *SWITCH_THREAD_FUNC outbound_agent_thread_run(switch_thread_t *threa
|
||||
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;
|
||||
|
@ -161,7 +161,7 @@ static int load_config(int reloading)
|
||||
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;
|
||||
|
||||
@ -171,7 +171,7 @@ static int load_config(int reloading)
|
||||
}
|
||||
|
||||
switch_zmalloc(node, sizeof(*node));
|
||||
node->name = strdup(name);
|
||||
node->name = strdup(name_attr);
|
||||
node->wval = tmp;
|
||||
|
||||
if (np) {
|
||||
|
@ -3840,11 +3840,11 @@ SWITCH_STANDARD_APP(pickup_function)
|
||||
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);
|
||||
@ -4700,17 +4700,17 @@ static switch_status_t next_file(switch_file_handle_t *handle)
|
||||
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);
|
||||
@ -5628,10 +5628,10 @@ SWITCH_STANDARD_APP(page_function)
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@
|
||||
<AdditionalOptions> /J</AdditionalOptions>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DisableSpecificWarnings>4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>6031;4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
@ -89,7 +89,7 @@
|
||||
<AdditionalOptions> /J</AdditionalOptions>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DisableSpecificWarnings>4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>6031;4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
@ -103,7 +103,7 @@
|
||||
<AdditionalOptions> /J</AdditionalOptions>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DisableSpecificWarnings>4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>6031;4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
@ -119,7 +119,7 @@
|
||||
<AdditionalOptions> /J</AdditionalOptions>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DisableSpecificWarnings>4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>6031;4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
|
@ -3677,7 +3677,7 @@ static int xml_callback(void *pArg, int argc, char **argv, char **columnNames)
|
||||
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] = "";
|
||||
|
@ -289,7 +289,6 @@ SWITCH_LIMIT_RELEASE(limit_release_hash)
|
||||
void *val = NULL;
|
||||
const void *key;
|
||||
switch_ssize_t keylen;
|
||||
limit_hash_item_t *item = NULL;
|
||||
|
||||
switch_core_hash_this(hi, &key, &keylen, &val);
|
||||
|
||||
|
@ -2437,7 +2437,7 @@ static size_t save_file_callback(void *ptr, size_t size, size_t nmemb, void *dat
|
||||
} 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));
|
||||
|
@ -609,7 +609,7 @@ static switch_status_t do_billing(switch_core_session_t *session)
|
||||
/* 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)
|
||||
{
|
||||
|
@ -146,7 +146,12 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="mod_redis.c" />
|
||||
<ClCompile Include="credis.c" />
|
||||
<ClCompile Include="credis.c">
|
||||
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4005;4389;4133;4244;4706;4306;4996;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4005;4389;4133;4244;4706;4306;4996;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4005;4389;4133;4244;4706;4306;4996;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4005;4389;4133;4244;4706;4306;4996;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\w32\Library\FreeSwitchCore.2015.vcxproj">
|
||||
|
@ -166,7 +166,7 @@ SWITCH_STANDARD_DIALPLAN(asterisk_dialplan_hunt)
|
||||
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;
|
||||
|
@ -4018,7 +4018,6 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi
|
||||
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) {
|
||||
|
@ -126,7 +126,7 @@
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<AdditionalOptions>/wd4290 /wd4996 %(AdditionalOptions)</AdditionalOptions>
|
||||
<DisableSpecificWarnings>4838;4267;4101;4244;4554;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
|
@ -137,12 +137,12 @@ static switch_status_t tech_init(loopback_private_t *tech_pvt, switch_core_sessi
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1016,7 +1016,7 @@ switch_status_t rtmp_handle_data(rtmp_session_t *rsession)
|
||||
|
||||
|
||||
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;
|
||||
@ -1057,7 +1057,7 @@ switch_status_t rtmp_handle_data(rtmp_session_t *rsession)
|
||||
}
|
||||
|
||||
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;
|
||||
|
@ -94,7 +94,7 @@ static switch_status_t sofia_on_init(switch_core_session_t *session)
|
||||
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) {
|
||||
|
@ -2111,7 +2111,7 @@ static uint32_t check_presence_epoch(void)
|
||||
{
|
||||
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);
|
||||
@ -2120,7 +2120,7 @@ static uint32_t check_presence_epoch(void)
|
||||
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);
|
||||
|
@ -857,7 +857,7 @@ long sofia_reg_uniform_distribution(int max)
|
||||
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);
|
||||
@ -2748,7 +2748,7 @@ auth_res_t sofia_reg_parse_auth(sofia_profile_t *profile,
|
||||
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;
|
||||
|
@ -136,7 +136,7 @@ int mcast_socket_create(const char *host, int16_t port, mcast_handle_t *handle,
|
||||
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));
|
||||
|
@ -78,7 +78,7 @@
|
||||
</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\src\include;%(AdditionalIncludeDirectories);..\..\..\..\libs\openssl-$(OpenSSLVersion)\include;$(ProjectDir)..\..\..\..\libs\pthreads-w32-2-9-1;.\;.\mcast</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_TIMESPEC_DEFINED;_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>6053;6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
@ -95,7 +95,7 @@
|
||||
</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\src\include;%(AdditionalIncludeDirectories);..\..\..\..\libs\openssl-$(OpenSSLVersion)\include;$(ProjectDir)..\..\..\..\libs\pthreads-w32-2-9-1;.\;.\mcast</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_TIMESPEC_DEFINED;_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>6053;6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
@ -110,7 +110,7 @@
|
||||
</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\src\include;%(AdditionalIncludeDirectories);..\..\..\..\libs\openssl-$(OpenSSLVersion)\include;$(ProjectDir)..\..\..\..\libs\pthreads-w32-2-9-1;.\;.\mcast</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_TIMESPEC_DEFINED;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>6053;6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
@ -127,7 +127,7 @@
|
||||
</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\src\include;%(AdditionalIncludeDirectories);..\..\..\..\libs\openssl-$(OpenSSLVersion)\include;$(ProjectDir)..\..\..\..\libs\pthreads-w32-2-9-1;.\;.\mcast</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_TIMESPEC_DEFINED;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>6053;6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
|
@ -1100,6 +1100,8 @@ static void attach_jsock(jsock_t *jsock)
|
||||
|
||||
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;
|
||||
@ -1543,7 +1545,7 @@ static void http_run(jsock_t *jsock)
|
||||
{
|
||||
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;
|
||||
@ -1600,7 +1602,7 @@ new_req:
|
||||
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) {
|
||||
@ -1793,9 +1795,9 @@ request_err:
|
||||
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;
|
||||
@ -5072,7 +5074,6 @@ static int verto_send_chat(const char *uid, const char *call_id, cJSON *msg)
|
||||
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);
|
||||
|
@ -399,7 +399,7 @@ SWITCH_STANDARD_APP(socket_function)
|
||||
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;
|
||||
|
@ -226,10 +226,10 @@ static void *SWITCH_THREAD_FUNC read_stream_thread(switch_thread_t *thread, void
|
||||
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);
|
||||
@ -1011,9 +1011,9 @@ static int launch_streams(const char *name)
|
||||
|
||||
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))) {
|
||||
|
@ -891,7 +891,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_codec_control(switch_codec_t *codec,
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user