mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-09 09:17:34 +00:00
windows compiler fixes.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9847 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
26453e1035
commit
85788d0c4a
@ -701,17 +701,17 @@ SWITCH_STANDARD_API(ctl_function)
|
|||||||
switch_core_session_ctl(SCSC_PAUSE_INBOUND, &arg);
|
switch_core_session_ctl(SCSC_PAUSE_INBOUND, &arg);
|
||||||
stream->write_function(stream, "+OK\n");
|
stream->write_function(stream, "+OK\n");
|
||||||
} else if (!strcasecmp(argv[0], "shutdown")) {
|
} else if (!strcasecmp(argv[0], "shutdown")) {
|
||||||
switch_session_ctl_t cmd = SCSC_SHUTDOWN;
|
switch_session_ctl_t command = SCSC_SHUTDOWN;
|
||||||
int x = 0;
|
int x = 0;
|
||||||
arg = 0;
|
arg = 0;
|
||||||
for (x = 1; x < 5; x++) {
|
for (x = 1; x < 5; x++) {
|
||||||
if (argv[x]) {
|
if (argv[x]) {
|
||||||
if (!strcasecmp(argv[x], "cancel")) {
|
if (!strcasecmp(argv[x], "cancel")) {
|
||||||
arg = 0;
|
arg = 0;
|
||||||
cmd = SCSC_CANCEL_SHUTDOWN;
|
command = SCSC_CANCEL_SHUTDOWN;
|
||||||
break;
|
break;
|
||||||
} else if (!strcasecmp(argv[x], "elegant")) {
|
} else if (!strcasecmp(argv[x], "elegant")) {
|
||||||
cmd = SCSC_SHUTDOWN_ELEGANT;
|
command = SCSC_SHUTDOWN_ELEGANT;
|
||||||
} else if (!strcasecmp(argv[x], "restart")) {
|
} else if (!strcasecmp(argv[x], "restart")) {
|
||||||
arg = 1;
|
arg = 1;
|
||||||
}
|
}
|
||||||
@ -719,7 +719,7 @@ SWITCH_STANDARD_API(ctl_function)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch_core_session_ctl(cmd, &arg);
|
switch_core_session_ctl(command, &arg);
|
||||||
stream->write_function(stream, "+OK\n");
|
stream->write_function(stream, "+OK\n");
|
||||||
} else if (!strcasecmp(argv[0], "reclaim_mem")) {
|
} else if (!strcasecmp(argv[0], "reclaim_mem")) {
|
||||||
switch_core_session_ctl(SCSC_RECLAIM, &arg);
|
switch_core_session_ctl(SCSC_RECLAIM, &arg);
|
||||||
@ -2596,6 +2596,7 @@ SWITCH_STANDARD_API(hupall_api_function)
|
|||||||
|
|
||||||
if (!switch_strlen_zero(cmd) && (mycmd = strdup(cmd))) {
|
if (!switch_strlen_zero(cmd) && (mycmd = strdup(cmd))) {
|
||||||
argc = switch_separate_string(mycmd, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
|
argc = switch_separate_string(mycmd, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
|
||||||
|
switch_assert(argv[0]);
|
||||||
if ((cause = switch_channel_str2cause(argv[0])) == SWITCH_CAUSE_NONE) {
|
if ((cause = switch_channel_str2cause(argv[0])) == SWITCH_CAUSE_NONE) {
|
||||||
cause = SWITCH_CAUSE_MANAGER_REQUEST;
|
cause = SWITCH_CAUSE_MANAGER_REQUEST;
|
||||||
}
|
}
|
||||||
|
@ -588,7 +588,7 @@ SWITCH_STANDARD_API(start_local_stream_function)
|
|||||||
if (argv[5]) {
|
if (argv[5]) {
|
||||||
tmp = atoi(argv[5]);
|
tmp = atoi(argv[5]);
|
||||||
if (tmp == 1 || tmp == 2) {
|
if (tmp == 1 || tmp == 2) {
|
||||||
channels = tmp;
|
channels = (uint8_t)tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -622,24 +622,24 @@ SWITCH_STANDARD_API(start_local_stream_function)
|
|||||||
char *val = (char *) switch_xml_attr_soft(param, "value");
|
char *val = (char *) switch_xml_attr_soft(param, "value");
|
||||||
|
|
||||||
if (!strcasecmp(var, "rate")) {
|
if (!strcasecmp(var, "rate")) {
|
||||||
int tmp = atoi(val);
|
tmp = atoi(val);
|
||||||
if (tmp == 8000 || tmp == 16000 || tmp == 32000) {
|
if (tmp == 8000 || tmp == 16000 || tmp == 32000) {
|
||||||
rate = tmp;
|
rate = tmp;
|
||||||
}
|
}
|
||||||
} else if (!strcasecmp(var, "shuffle")) {
|
} else if (!strcasecmp(var, "shuffle")) {
|
||||||
shuffle = switch_true(val);
|
shuffle = switch_true(val);
|
||||||
} else if (!strcasecmp(var, "prebuf")) {
|
} else if (!strcasecmp(var, "prebuf")) {
|
||||||
int tmp = atoi(val);
|
tmp = atoi(val);
|
||||||
if (tmp > 0) {
|
if (tmp > 0) {
|
||||||
prebuf = (uint32_t) tmp;
|
prebuf = (uint32_t) tmp;
|
||||||
}
|
}
|
||||||
} else if (!strcasecmp(var, "channels")) {
|
} else if (!strcasecmp(var, "channels")) {
|
||||||
int tmp = atoi(val);
|
tmp = atoi(val);
|
||||||
if (tmp == 1 || tmp == 2) {
|
if (tmp == 1 || tmp == 2) {
|
||||||
channels = (uint8_t) tmp;
|
channels = (uint8_t) tmp;
|
||||||
}
|
}
|
||||||
} else if (!strcasecmp(var, "interval")) {
|
} else if (!strcasecmp(var, "interval")) {
|
||||||
int tmp = atoi(val);
|
tmp = atoi(val);
|
||||||
if (SWITCH_ACCEPTABLE_INTERVAL(tmp)) {
|
if (SWITCH_ACCEPTABLE_INTERVAL(tmp)) {
|
||||||
interval = tmp;
|
interval = tmp;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user