mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-29 13:43:07 +00:00
Merge pull request #142 in FS/freeswitch from ~BORDMI/freeswitch-fs-7098-7099:master to master
* commit 'c96d64e7e142d43db1864da17520d69268627aa3': invalid type cast correction list_users tipo correction
This commit is contained in:
commit
dc8c8cc7b8
@ -303,7 +303,7 @@ end:
|
|||||||
SWITCH_STANDARD_API(list_users_function)
|
SWITCH_STANDARD_API(list_users_function)
|
||||||
{
|
{
|
||||||
int argc;
|
int argc;
|
||||||
char *pdata, *argv[8];
|
char *pdata, *argv[9];
|
||||||
int32_t arg = 0;
|
int32_t arg = 0;
|
||||||
switch_xml_t xml_root, x_domains, x_domain_tag;
|
switch_xml_t xml_root, x_domains, x_domain_tag;
|
||||||
switch_xml_t gts, gt, uts, ut;
|
switch_xml_t gts, gt, uts, ut;
|
||||||
@ -313,7 +313,7 @@ SWITCH_STANDARD_API(list_users_function)
|
|||||||
if ((pdata = strdup(cmd))) {
|
if ((pdata = strdup(cmd))) {
|
||||||
argc = switch_separate_string(pdata, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
|
argc = switch_separate_string(pdata, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
|
||||||
|
|
||||||
if (argc >= 8) {
|
if (argc >= 9) {
|
||||||
stream->write_function(stream, "-USAGE: %s\n", LIST_USERS_SYNTAX);
|
stream->write_function(stream, "-USAGE: %s\n", LIST_USERS_SYNTAX);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
@ -857,7 +857,7 @@ long sofia_reg_uniform_distribution(int max)
|
|||||||
int result;
|
int result;
|
||||||
int range = max + 1;
|
int range = max + 1;
|
||||||
|
|
||||||
srand((unsigned) switch_thread_self() + switch_micro_time_now());
|
srand((intptr_t) switch_thread_self() + switch_micro_time_now());
|
||||||
result = (int)((double)rand() / (((double)RAND_MAX + (double)1) / range));
|
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);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG9, "Generated random %ld, max is %d\n", (long) result, max);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user