提交 e8f7c1b4 authored 作者: Michael Jerris's avatar Michael Jerris

fix windows build.. break other things.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5853 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 e1fbb6ff
差异被折叠。
......@@ -182,8 +182,8 @@ class CoreSession {
* receiving dtmf digits. For that, use collectDigits.
*/
int getDigits(char *dtmf_buf,
int buflen,
int maxdigits,
switch_size_t buflen,
switch_size_t maxdigits,
char *terminators,
char *terminator,
int timeout);
......
......@@ -139,8 +139,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_callback(switch_core_s
*/
SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_count(switch_core_session_t *session,
char *buf,
uint32_t buflen,
uint32_t maxdigits, const char *terminators, char *terminator, uint32_t timeout);
switch_size_t buflen,
switch_size_t maxdigits, const char *terminators, char *terminator, uint32_t timeout);
/*!
\brief Engage background Speech detection on a session
......
......@@ -4124,8 +4124,8 @@ SWITCH_STANDARD_APP(conference_function)
status = switch_ivr_collect_digits_count(session,
buf,
sizeof(pin_buf) - (unsigned int) strlen(pin_buf),
(unsigned int) strlen(conference->pin) - (unsigned int) strlen(pin_buf), "#", &term, 10000);
sizeof(pin_buf) - strlen(pin_buf),
strlen(conference->pin) - strlen(pin_buf), "#", &term, 10000);
}
pin_valid = (status == SWITCH_STATUS_SUCCESS && strcmp(pin_buf, conference->pin) == 0);
......
......@@ -344,7 +344,7 @@ SWITCH_STANDARD_APP(rss_function)
#endif
char term;
char *cp;
int blen = sizeof(cmd) - (int) strlen(cmd);
switch_size_t blen = sizeof(cmd) - strlen(cmd);
cp = cmd + blen;
switch_ivr_collect_digits_count(session, cp, blen, blen, "#", &term, 5000);
......
......@@ -35,8 +35,11 @@
#include <switch_odbc.h>
#endif
#ifdef _MSC_VER /* compilers are stupid sometimes */
#define TRY_CODE(code) for(;;) {status = code; if (status != SWITCH_STATUS_SUCCESS && status != SWITCH_STATUS_BREAK) { goto end; } break;}
#else
#define TRY_CODE(code) do {status = code; if (status != SWITCH_STATUS_SUCCESS && status != SWITCH_STATUS_BREAK) { goto end; } break;} while(status)
#endif
SWITCH_MODULE_LOAD_FUNCTION(mod_voicemail_load);
SWITCH_MODULE_DEFINITION(mod_voicemail, mod_voicemail_load, NULL, NULL);
......
......@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="mod_voicemail"
ProjectGUID="{C24FB505-05D7-4319-8485-7540B44C8603}"
ProjectGUID="{D7F1E3F2-A3F4-474C-8555-15122571AF52}"
RootNamespace="mod_voicemail"
Keyword="Win32Proj"
>
......
......@@ -168,8 +168,8 @@ int CoreSession::collectDigits(int timeout) {
}
int CoreSession::getDigits(char *dtmf_buf,
int buflen,
int maxdigits,
switch_size_t buflen,
switch_size_t maxdigits,
char *terminators,
char *terminator,
int timeout)
......@@ -180,8 +180,8 @@ int CoreSession::getDigits(char *dtmf_buf,
status = switch_ivr_collect_digits_count(session,
dtmf_buf,
(uint32_t) buflen,
(uint32_t) maxdigits,
buflen,
maxdigits,
terminators,
terminator,
(uint32_t) timeout);
......
......@@ -602,10 +602,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_callback(switch_core_s
SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_count(switch_core_session_t *session,
char *buf,
uint32_t buflen,
uint32_t maxdigits, const char *terminators, char *terminator, uint32_t timeout)
switch_size_t buflen,
switch_size_t maxdigits, const char *terminators, char *terminator, uint32_t timeout)
{
uint32_t i = 0, x = (uint32_t) strlen(buf);
switch_size_t i = 0, x = strlen(buf);
switch_channel_t *channel;
switch_status_t status = SWITCH_STATUS_FALSE;
switch_time_t started = 0;
......@@ -648,7 +648,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_count(switch_core_sess
char dtmf[128];
switch_channel_dequeue_dtmf(channel, dtmf, maxdigits);
for (i = 0; i < (uint32_t) strlen(dtmf); i++) {
for (i = 0; i < strlen(dtmf); i++) {
if (!switch_strlen_zero(terminators) && strchr(terminators, dtmf[i]) && terminator != NULL) {
*terminator = dtmf[i];
......
......@@ -46,7 +46,7 @@ struct switch_ivr_menu {
char *ptr;
int max_failures;
int timeout;
uint32_t inlen;
switch_size_t inlen;
uint32_t flags;
struct switch_ivr_menu_action *actions;
struct switch_ivr_menu *next;
......@@ -234,7 +234,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_free(switch_ivr_menu_t * s
return status;
}
static switch_status_t play_or_say(switch_core_session_t *session, switch_ivr_menu_t * menu, char *sound, uint32_t need)
static switch_status_t play_or_say(switch_core_session_t *session, switch_ivr_menu_t * menu, char *sound, switch_size_t need)
{
char terminator;
uint32_t len;
......@@ -252,7 +252,7 @@ static switch_status_t play_or_say(switch_core_session_t *session, switch_ivr_me
len = 1;
ptr = NULL;
} else {
len = menu->inlen;
len = (uint32_t) menu->inlen;
ptr = menu->ptr;
}
args.buf = ptr;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论