mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-09 01:06:00 +00:00
Merge branch 'signalwire:master' into mod_verto-cmd-profile
This commit is contained in:
commit
92c7ff89e2
@ -184,9 +184,7 @@ FST_TEST_END()
|
|||||||
|
|
||||||
FST_TEST_BEGIN(get_time)
|
FST_TEST_BEGIN(get_time)
|
||||||
{
|
{
|
||||||
char time_stamp[TIME_STAMP_LENGTH];
|
|
||||||
char date_stamp[DATE_STAMP_LENGTH];
|
char date_stamp[DATE_STAMP_LENGTH];
|
||||||
char time_stamp_test[TIME_STAMP_LENGTH];
|
|
||||||
char date_stamp_test[DATE_STAMP_LENGTH];
|
char date_stamp_test[DATE_STAMP_LENGTH];
|
||||||
|
|
||||||
// Get date and time for test case
|
// Get date and time for test case
|
||||||
@ -197,16 +195,13 @@ FST_TEST_BEGIN(get_time)
|
|||||||
|
|
||||||
// Get date and time to test
|
// Get date and time to test
|
||||||
get_time("%Y%m%d", date_stamp, DATE_STAMP_LENGTH);
|
get_time("%Y%m%d", date_stamp, DATE_STAMP_LENGTH);
|
||||||
get_time("%Y%m%dT%H%M%SZ", time_stamp, TIME_STAMP_LENGTH);
|
|
||||||
|
|
||||||
// https://fresh2refresh.com/c-programming/c-time-related-functions/
|
// https://fresh2refresh.com/c-programming/c-time-related-functions/
|
||||||
// https://stackoverflow.com/questions/5141960/get-the-current-time-in-c/5142028
|
// https://stackoverflow.com/questions/5141960/get-the-current-time-in-c/5142028
|
||||||
// https://linux.die.net/man/3/ctime
|
// https://linux.die.net/man/3/ctime
|
||||||
// https://stackoverflow.com/questions/153890/printing-leading-0s-in-c
|
// https://stackoverflow.com/questions/153890/printing-leading-0s-in-c
|
||||||
switch_snprintf(date_stamp_test, DATE_STAMP_LENGTH, "%d%02d%02d", timeinfo->tm_year + 1900, timeinfo->tm_mon + 1, timeinfo->tm_mday);
|
switch_snprintf(date_stamp_test, DATE_STAMP_LENGTH, "%d%02d%02d", timeinfo->tm_year + 1900, timeinfo->tm_mon + 1, timeinfo->tm_mday);
|
||||||
switch_snprintf(time_stamp_test, TIME_STAMP_LENGTH, "%d%02d%02dT%02d%02d%02dZ", timeinfo->tm_year + 1900, timeinfo->tm_mon + 1, timeinfo->tm_mday, timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec);
|
|
||||||
|
|
||||||
fst_check_string_equals(time_stamp_test, time_stamp);
|
|
||||||
fst_check_string_equals(date_stamp_test, date_stamp);
|
fst_check_string_equals(date_stamp_test, date_stamp);
|
||||||
}
|
}
|
||||||
FST_TEST_END()
|
FST_TEST_END()
|
||||||
|
@ -774,6 +774,11 @@ switch_status_t pgsql_next_result_timed(switch_pgsql_handle_t *handle, switch_pg
|
|||||||
case PGRES_COPY_IN:
|
case PGRES_COPY_IN:
|
||||||
case PGRES_COMMAND_OK:
|
case PGRES_COMMAND_OK:
|
||||||
break;
|
break;
|
||||||
|
#if POSTGRESQL_MAJOR_VERSION >= 14
|
||||||
|
case PGRES_PIPELINE_ABORTED:
|
||||||
|
case PGRES_PIPELINE_SYNC:
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
case PGRES_EMPTY_QUERY:
|
case PGRES_EMPTY_QUERY:
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Query (%s) returned PGRES_EMPTY_QUERY\n", handle->sql);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Query (%s) returned PGRES_EMPTY_QUERY\n", handle->sql);
|
||||||
case PGRES_BAD_RESPONSE:
|
case PGRES_BAD_RESPONSE:
|
||||||
|
@ -2155,7 +2155,7 @@ static void switch_send_rtcp_event(switch_rtp_t *rtp_session ,struct switch_rtcp
|
|||||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, header, value);
|
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, header, value);
|
||||||
snprintf(header, sizeof(header), "Source-Lost");
|
snprintf(header, sizeof(header), "Source-Lost");
|
||||||
#if SWITCH_BYTE_ORDER == __BIG_ENDIAN
|
#if SWITCH_BYTE_ORDER == __BIG_ENDIAN
|
||||||
tmpLost = report->lost; /* signed 24bit will extended signess to int32_t automatically */
|
tmpLost = rtcp_report_block->lost; /* signed 24bit will extended signess to int32_t automatically */
|
||||||
#else
|
#else
|
||||||
tmpLost = ntohl(rtcp_report_block->lost)>>8;
|
tmpLost = ntohl(rtcp_report_block->lost)>>8;
|
||||||
tmpLost = tmpLost | ((tmpLost & 0x00800000) ? 0xff000000 : 0x00000000); /* ...and signess compensation */
|
tmpLost = tmpLost | ((tmpLost & 0x00800000) ? 0xff000000 : 0x00000000); /* ...and signess compensation */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user