Merge branch 'signalwire:master' into master
This commit is contained in:
commit
bd46b172b2
|
@ -1 +1 @@
|
|||
1.10.10-dev
|
||||
1.10.11-dev
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
|
||||
# Must change all of the below together
|
||||
# For a release, set revision for that tagged release as well and uncomment
|
||||
AC_INIT([freeswitch], [1.10.10-dev], bugs@freeswitch.org)
|
||||
AC_INIT([freeswitch], [1.10.11-dev], bugs@freeswitch.org)
|
||||
AC_SUBST(SWITCH_VERSION_MAJOR, [1])
|
||||
AC_SUBST(SWITCH_VERSION_MINOR, [10])
|
||||
AC_SUBST(SWITCH_VERSION_MICRO, [10-dev])
|
||||
AC_SUBST(SWITCH_VERSION_MICRO, [11-dev])
|
||||
AC_SUBST(SWITCH_VERSION_REVISION, [])
|
||||
AC_SUBST(SWITCH_VERSION_REVISION_HUMAN, [])
|
||||
|
||||
|
|
|
@ -106,12 +106,13 @@ typedef struct icand_s {
|
|||
} icand_t;
|
||||
|
||||
#define MAX_CAND 50
|
||||
#define MAX_CAND_IDX_COUNT 2
|
||||
typedef struct ice_s {
|
||||
|
||||
icand_t cands[MAX_CAND][2];
|
||||
int cand_idx[2];
|
||||
int chosen[2];
|
||||
int is_chosen[2];
|
||||
icand_t cands[MAX_CAND][MAX_CAND_IDX_COUNT];
|
||||
int cand_idx[MAX_CAND_IDX_COUNT];
|
||||
int chosen[MAX_CAND_IDX_COUNT];
|
||||
int is_chosen[MAX_CAND_IDX_COUNT];
|
||||
char *ufrag;
|
||||
char *pwd;
|
||||
char *options;
|
||||
|
|
|
@ -498,6 +498,14 @@ SWITCH_DECLARE(switch_size_t) switch_fp_read_dline(FILE *fd, char **buf, switch_
|
|||
SWITCH_DECLARE(switch_status_t) switch_frame_alloc(switch_frame_t **frame, switch_size_t size);
|
||||
SWITCH_DECLARE(switch_status_t) switch_frame_dup(switch_frame_t *orig, switch_frame_t **clone);
|
||||
SWITCH_DECLARE(switch_status_t) switch_frame_free(switch_frame_t **frame);
|
||||
|
||||
/*! \brief Check if a 32 bit unsigned number is in a range.
|
||||
* \param str string to check. Should not contain non-digit characters.
|
||||
* \param from start of range including this number
|
||||
* \param to end of range including this number
|
||||
* \return true or false
|
||||
*/
|
||||
SWITCH_DECLARE(switch_bool_t) switch_is_uint_in_range(const char *str, unsigned int from, unsigned int to);
|
||||
SWITCH_DECLARE(switch_bool_t) switch_is_number(const char *str);
|
||||
SWITCH_DECLARE(switch_bool_t) switch_is_leading_number(const char *str);
|
||||
SWITCH_DECLARE(char *) switch_find_parameter(const char *str, const char *param, switch_memory_pool_t *pool);
|
||||
|
|
|
@ -21077,6 +21077,22 @@ SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_frame_free___(void *
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_is_uint_in_range___(char * jarg1, unsigned int jarg2, unsigned int jarg3) {
|
||||
int jresult ;
|
||||
char *arg1 = (char *) 0 ;
|
||||
unsigned int arg2 ;
|
||||
unsigned int arg3 ;
|
||||
switch_bool_t result;
|
||||
|
||||
arg1 = (char *)jarg1;
|
||||
arg2 = (unsigned int)jarg2;
|
||||
arg3 = (unsigned int)jarg3;
|
||||
result = (switch_bool_t)switch_is_uint_in_range((char const *)arg1,arg2,arg3);
|
||||
jresult = (int)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_is_number___(char * jarg1) {
|
||||
int jresult ;
|
||||
char *arg1 = (char *) 0 ;
|
||||
|
@ -33245,6 +33261,50 @@ SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_codec_fmtp_microsecon
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_codec_fmtp_max_ptime_set___(void * jarg1, int jarg2) {
|
||||
switch_codec_fmtp *arg1 = (switch_codec_fmtp *) 0 ;
|
||||
int arg2 ;
|
||||
|
||||
arg1 = (switch_codec_fmtp *)jarg1;
|
||||
arg2 = (int)jarg2;
|
||||
if (arg1) (arg1)->max_ptime = arg2;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_codec_fmtp_max_ptime_get___(void * jarg1) {
|
||||
int jresult ;
|
||||
switch_codec_fmtp *arg1 = (switch_codec_fmtp *) 0 ;
|
||||
int result;
|
||||
|
||||
arg1 = (switch_codec_fmtp *)jarg1;
|
||||
result = (int) ((arg1)->max_ptime);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_codec_fmtp_min_ptime_set___(void * jarg1, int jarg2) {
|
||||
switch_codec_fmtp *arg1 = (switch_codec_fmtp *) 0 ;
|
||||
int arg2 ;
|
||||
|
||||
arg1 = (switch_codec_fmtp *)jarg1;
|
||||
arg2 = (int)jarg2;
|
||||
if (arg1) (arg1)->min_ptime = arg2;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_codec_fmtp_min_ptime_get___(void * jarg1) {
|
||||
int jresult ;
|
||||
switch_codec_fmtp *arg1 = (switch_codec_fmtp *) 0 ;
|
||||
int result;
|
||||
|
||||
arg1 = (switch_codec_fmtp *)jarg1;
|
||||
result = (int) ((arg1)->min_ptime);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_codec_fmtp_stereo_set___(void * jarg1, int jarg2) {
|
||||
switch_codec_fmtp *arg1 = (switch_codec_fmtp *) 0 ;
|
||||
int arg2 ;
|
||||
|
@ -33267,6 +33327,28 @@ SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_codec_fmtp_stereo_get
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_codec_fmtp_sprop_stereo_set___(void * jarg1, int jarg2) {
|
||||
switch_codec_fmtp *arg1 = (switch_codec_fmtp *) 0 ;
|
||||
int arg2 ;
|
||||
|
||||
arg1 = (switch_codec_fmtp *)jarg1;
|
||||
arg2 = (int)jarg2;
|
||||
if (arg1) (arg1)->sprop_stereo = arg2;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_codec_fmtp_sprop_stereo_get___(void * jarg1) {
|
||||
int jresult ;
|
||||
switch_codec_fmtp *arg1 = (switch_codec_fmtp *) 0 ;
|
||||
int result;
|
||||
|
||||
arg1 = (switch_codec_fmtp *)jarg1;
|
||||
result = (int) ((arg1)->sprop_stereo);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_codec_fmtp_private_info_set___(void * jarg1, void * jarg2) {
|
||||
switch_codec_fmtp *arg1 = (switch_codec_fmtp *) 0 ;
|
||||
void *arg2 = (void *) 0 ;
|
||||
|
@ -36802,6 +36884,44 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_channel_get_variab
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_channel_get_variable_strdup___(void * jarg1, char * jarg2) {
|
||||
char * jresult ;
|
||||
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *result = 0 ;
|
||||
|
||||
arg1 = (switch_channel_t *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
result = (char *)switch_channel_get_variable_strdup(arg1,(char const *)arg2);
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_channel_get_variable_buf___(void * jarg1, char * jarg2, char * jarg3, void * jarg4) {
|
||||
int jresult ;
|
||||
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
switch_size_t arg4 ;
|
||||
switch_size_t *argp4 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_channel_t *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (char *)jarg3;
|
||||
argp4 = (switch_size_t *)jarg4;
|
||||
if (!argp4) {
|
||||
SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null switch_size_t", 0);
|
||||
return 0;
|
||||
}
|
||||
arg4 = *argp4;
|
||||
result = (switch_status_t)switch_channel_get_variable_buf(arg1,(char const *)arg2,arg3,arg4);
|
||||
jresult = (int)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_channel_get_variables___(void * jarg1, void * jarg2) {
|
||||
int jresult ;
|
||||
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
|
||||
|
@ -45145,6 +45265,16 @@ SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_MAX_CAND_get___() {
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_MAX_CAND_IDX_COUNT_get___() {
|
||||
int jresult ;
|
||||
int result;
|
||||
|
||||
result = (int)(2);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_FreeSWITCHfNative_ice_t_cands_set___(void * jarg1, void * jarg2) {
|
||||
ice_s *arg1 = (ice_s *) 0 ;
|
||||
icand_t (*arg2)[2] ;
|
||||
|
|
|
@ -10932,6 +10932,11 @@ else
|
|||
return ret;
|
||||
}
|
||||
|
||||
public static switch_bool_t switch_is_uint_in_range(string str, uint from, uint to) {
|
||||
switch_bool_t ret = (switch_bool_t)freeswitchPINVOKE.switch_is_uint_in_range(str, from, to);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_bool_t switch_is_number(string str) {
|
||||
switch_bool_t ret = (switch_bool_t)freeswitchPINVOKE.switch_is_number(str);
|
||||
return ret;
|
||||
|
@ -11884,6 +11889,17 @@ else
|
|||
return ret;
|
||||
}
|
||||
|
||||
public static string switch_channel_get_variable_strdup(SWIGTYPE_p_switch_channel channel, string varname) {
|
||||
string ret = freeswitchPINVOKE.switch_channel_get_variable_strdup(SWIGTYPE_p_switch_channel.getCPtr(channel), varname);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_channel_get_variable_buf(SWIGTYPE_p_switch_channel channel, string varname, string buf, SWIGTYPE_p_switch_size_t buflen) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_channel_get_variable_buf(SWIGTYPE_p_switch_channel.getCPtr(channel), varname, buf, SWIGTYPE_p_switch_size_t.getCPtr(buflen));
|
||||
if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_channel_get_variables(SWIGTYPE_p_switch_channel channel, SWIGTYPE_p_p_switch_event arg1) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_channel_get_variables(SWIGTYPE_p_switch_channel.getCPtr(channel), SWIGTYPE_p_p_switch_event.getCPtr(arg1));
|
||||
return ret;
|
||||
|
@ -15223,6 +15239,7 @@ else
|
|||
public static readonly string SWITCH_RTP_CRYPTO_KEY_80 = freeswitchPINVOKE.SWITCH_RTP_CRYPTO_KEY_80_get();
|
||||
public static readonly int SWITCH_RTP_BUNDLE_INTERNAL_PT = freeswitchPINVOKE.SWITCH_RTP_BUNDLE_INTERNAL_PT_get();
|
||||
public static readonly int MAX_CAND = freeswitchPINVOKE.MAX_CAND_get();
|
||||
public static readonly int MAX_CAND_IDX_COUNT = freeswitchPINVOKE.MAX_CAND_IDX_COUNT_get();
|
||||
public static readonly int SWITCH_XML_BUFSIZE = freeswitchPINVOKE.SWITCH_XML_BUFSIZE_get();
|
||||
}
|
||||
|
||||
|
@ -20575,6 +20592,9 @@ class freeswitchPINVOKE {
|
|||
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_switch_frame_free___")]
|
||||
public static extern int switch_frame_free(global::System.Runtime.InteropServices.HandleRef jarg1);
|
||||
|
||||
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_switch_is_uint_in_range___")]
|
||||
public static extern int switch_is_uint_in_range(string jarg1, uint jarg2, uint jarg3);
|
||||
|
||||
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_switch_is_number___")]
|
||||
public static extern int switch_is_number(string jarg1);
|
||||
|
||||
|
@ -23614,12 +23634,30 @@ class freeswitchPINVOKE {
|
|||
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_switch_codec_fmtp_microseconds_per_packet_get___")]
|
||||
public static extern int switch_codec_fmtp_microseconds_per_packet_get(global::System.Runtime.InteropServices.HandleRef jarg1);
|
||||
|
||||
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_switch_codec_fmtp_max_ptime_set___")]
|
||||
public static extern void switch_codec_fmtp_max_ptime_set(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
|
||||
|
||||
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_switch_codec_fmtp_max_ptime_get___")]
|
||||
public static extern int switch_codec_fmtp_max_ptime_get(global::System.Runtime.InteropServices.HandleRef jarg1);
|
||||
|
||||
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_switch_codec_fmtp_min_ptime_set___")]
|
||||
public static extern void switch_codec_fmtp_min_ptime_set(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
|
||||
|
||||
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_switch_codec_fmtp_min_ptime_get___")]
|
||||
public static extern int switch_codec_fmtp_min_ptime_get(global::System.Runtime.InteropServices.HandleRef jarg1);
|
||||
|
||||
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_switch_codec_fmtp_stereo_set___")]
|
||||
public static extern void switch_codec_fmtp_stereo_set(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
|
||||
|
||||
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_switch_codec_fmtp_stereo_get___")]
|
||||
public static extern int switch_codec_fmtp_stereo_get(global::System.Runtime.InteropServices.HandleRef jarg1);
|
||||
|
||||
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_switch_codec_fmtp_sprop_stereo_set___")]
|
||||
public static extern void switch_codec_fmtp_sprop_stereo_set(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
|
||||
|
||||
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_switch_codec_fmtp_sprop_stereo_get___")]
|
||||
public static extern int switch_codec_fmtp_sprop_stereo_get(global::System.Runtime.InteropServices.HandleRef jarg1);
|
||||
|
||||
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_switch_codec_fmtp_private_info_set___")]
|
||||
public static extern void switch_codec_fmtp_private_info_set(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
|
||||
|
||||
|
@ -24487,6 +24525,12 @@ class freeswitchPINVOKE {
|
|||
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_switch_channel_get_variable_dup___")]
|
||||
public static extern string switch_channel_get_variable_dup(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, int jarg3, int jarg4);
|
||||
|
||||
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_switch_channel_get_variable_strdup___")]
|
||||
public static extern string switch_channel_get_variable_strdup(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2);
|
||||
|
||||
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_switch_channel_get_variable_buf___")]
|
||||
public static extern int switch_channel_get_variable_buf(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, string jarg3, global::System.Runtime.InteropServices.HandleRef jarg4);
|
||||
|
||||
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_switch_channel_get_variables___")]
|
||||
public static extern int switch_channel_get_variables(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
|
||||
|
||||
|
@ -26281,6 +26325,9 @@ class freeswitchPINVOKE {
|
|||
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_MAX_CAND_get___")]
|
||||
public static extern int MAX_CAND_get();
|
||||
|
||||
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_MAX_CAND_IDX_COUNT_get___")]
|
||||
public static extern int MAX_CAND_IDX_COUNT_get();
|
||||
|
||||
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_ice_t_cands_set___")]
|
||||
public static extern void ice_t_cands_set(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
|
||||
|
||||
|
@ -31066,7 +31113,8 @@ public enum switch_call_cause_t {
|
|||
SWITCH_CAUSE_BAD_IDENTITY_INFO = 821,
|
||||
SWITCH_CAUSE_UNSUPPORTED_CERTIFICATE = 822,
|
||||
SWITCH_CAUSE_INVALID_IDENTITY = 823,
|
||||
SWITCH_CAUSE_STALE_DATE = 824
|
||||
SWITCH_CAUSE_STALE_DATE = 824,
|
||||
SWITCH_CAUSE_REJECT_ALL = 825
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -32781,6 +32829,7 @@ public enum switch_codec_control_command_t {
|
|||
SCC_VIDEO_RESET,
|
||||
SCC_AUDIO_PACKET_LOSS,
|
||||
SCC_AUDIO_ADJUST_BITRATE,
|
||||
SCC_AUDIO_VAD,
|
||||
SCC_DEBUG,
|
||||
SCC_CODEC_SPECIFIC
|
||||
}
|
||||
|
@ -32905,6 +32954,26 @@ public class switch_codec_fmtp : global::System.IDisposable {
|
|||
}
|
||||
}
|
||||
|
||||
public int max_ptime {
|
||||
set {
|
||||
freeswitchPINVOKE.switch_codec_fmtp_max_ptime_set(swigCPtr, value);
|
||||
}
|
||||
get {
|
||||
int ret = freeswitchPINVOKE.switch_codec_fmtp_max_ptime_get(swigCPtr);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public int min_ptime {
|
||||
set {
|
||||
freeswitchPINVOKE.switch_codec_fmtp_min_ptime_set(swigCPtr, value);
|
||||
}
|
||||
get {
|
||||
int ret = freeswitchPINVOKE.switch_codec_fmtp_min_ptime_get(swigCPtr);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public int stereo {
|
||||
set {
|
||||
freeswitchPINVOKE.switch_codec_fmtp_stereo_set(swigCPtr, value);
|
||||
|
@ -32915,6 +32984,16 @@ public class switch_codec_fmtp : global::System.IDisposable {
|
|||
}
|
||||
}
|
||||
|
||||
public int sprop_stereo {
|
||||
set {
|
||||
freeswitchPINVOKE.switch_codec_fmtp_sprop_stereo_set(swigCPtr, value);
|
||||
}
|
||||
get {
|
||||
int ret = freeswitchPINVOKE.switch_codec_fmtp_sprop_stereo_get(swigCPtr);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_void private_info {
|
||||
set {
|
||||
freeswitchPINVOKE.switch_codec_fmtp_private_info_set(swigCPtr, SWIGTYPE_p_void.getCPtr(value));
|
||||
|
|
|
@ -4167,10 +4167,15 @@ static switch_status_t check_ice(switch_media_handle_t *smh, switch_media_type_t
|
|||
|
||||
argc = switch_split(data, ' ', fields);
|
||||
|
||||
if (argc < 6 || !switch_is_uint_in_range(fields[1], 1, MAX_CAND_IDX_COUNT)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(smh->session), SWITCH_LOG_WARNING, "Invalid data\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
cid = fields[1] ? atoi(fields[1]) - 1 : 0;
|
||||
|
||||
if (argc < 6 || engine->ice_in.cand_idx[cid] >= MAX_CAND - 1) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(smh->session), SWITCH_LOG_WARNING, "Invalid data\n");
|
||||
if (engine->ice_in.cand_idx[cid] >= MAX_CAND - 1) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(smh->session), SWITCH_LOG_WARNING, "Too many candidates\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -4250,7 +4255,7 @@ static switch_status_t check_ice(switch_media_handle_t *smh, switch_media_type_t
|
|||
|
||||
relay:
|
||||
|
||||
for (cid = 0; cid < 2; cid++) {
|
||||
for (cid = 0; cid < MAX_CAND_IDX_COUNT; cid++) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(smh->session), SWITCH_LOG_DEBUG, "Searching for %s candidate.\n", cid ? "rtcp" : "rtp");
|
||||
|
||||
for (ai = 0; ai < engine->cand_acl_count; ai++) {
|
||||
|
|
|
@ -1607,6 +1607,30 @@ SWITCH_DECLARE(char *) switch_separate_paren_args(char *str)
|
|||
return args;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_bool_t) switch_is_uint_in_range(const char *str, unsigned int from, unsigned int to)
|
||||
{
|
||||
unsigned int number;
|
||||
const char *original_str = str;
|
||||
|
||||
if (str == NULL || *str == '\0' || from > to) {
|
||||
return SWITCH_FALSE;
|
||||
}
|
||||
|
||||
for (; *str != '\0'; str++) {
|
||||
if (!isdigit(*str)) {
|
||||
return SWITCH_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
number = atoi(original_str);
|
||||
|
||||
if (number < from || number > to) {
|
||||
return SWITCH_FALSE;
|
||||
}
|
||||
|
||||
return SWITCH_TRUE;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_bool_t) switch_is_number(const char *str)
|
||||
{
|
||||
const char *p;
|
||||
|
|
|
@ -95,6 +95,21 @@ FST_CORE_BEGIN("./conf")
|
|||
FST_TEST_END()
|
||||
#endif
|
||||
|
||||
FST_TEST_BEGIN(test_switch_is_number_in_range)
|
||||
{
|
||||
fst_check_int_equals(switch_is_uint_in_range("x5", 0, 10), SWITCH_FALSE);
|
||||
fst_check_int_equals(switch_is_uint_in_range("0", 1, 10), SWITCH_FALSE);
|
||||
fst_check_int_equals(switch_is_uint_in_range("-11", -10, 10), SWITCH_FALSE);
|
||||
fst_check_int_equals(switch_is_uint_in_range("-10", -10, 10), SWITCH_FALSE);
|
||||
fst_check_int_equals(switch_is_uint_in_range("-5", -10, 10), SWITCH_FALSE);
|
||||
fst_check_int_equals(switch_is_uint_in_range("-5", -10, 10), SWITCH_FALSE);
|
||||
fst_check_int_equals(switch_is_uint_in_range("5", -10, 10), SWITCH_FALSE);
|
||||
fst_check_int_equals(switch_is_uint_in_range("0", 0, 10), SWITCH_TRUE);
|
||||
fst_check_int_equals(switch_is_uint_in_range("10", 0, 10), SWITCH_TRUE);
|
||||
fst_check_int_equals(switch_is_uint_in_range("11", 0, 10), SWITCH_FALSE);
|
||||
}
|
||||
FST_TEST_END()
|
||||
|
||||
FST_TEST_BEGIN(test_md5)
|
||||
{
|
||||
char digest[SWITCH_MD5_DIGEST_STRING_SIZE] = { 0 };
|
||||
|
|
Loading…
Reference in New Issue