mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-05-03 06:52:05 +00:00
fix windows build
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6421 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
46a9ef7feb
commit
0dbc6515d2
@ -64,12 +64,13 @@ SWITCH_DECLARE(void) switch_console_loop(void);
|
|||||||
SWITCH_DECLARE(void) switch_console_printf(switch_text_channel_t channel, const char *file, const char *func, int line,
|
SWITCH_DECLARE(void) switch_console_printf(switch_text_channel_t channel, const char *file, const char *func, int line,
|
||||||
const char *fmt, ...) PRINTF_FUNCTION(5, 6);
|
const char *fmt, ...) PRINTF_FUNCTION(5, 6);
|
||||||
|
|
||||||
SWITCH_DECLARE(switch_status_t) switch_console_stream_raw_write(switch_stream_handle_t *handle, uint8_t *data, switch_size_t datalen);
|
SWITCH_DECLARE_NONSTD(switch_status_t) switch_console_stream_raw_write(switch_stream_handle_t *handle, uint8_t *data, switch_size_t datalen);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief A method akin to printf for dealing with api streams
|
\brief A method akin to printf for dealing with api streams
|
||||||
*/
|
*/
|
||||||
SWITCH_DECLARE(switch_status_t) switch_console_stream_write(switch_stream_handle_t *handle, const char *fmt, ...) PRINTF_FUNCTION(2, 3);
|
SWITCH_DECLARE_NONSTD(switch_status_t) switch_console_stream_write(switch_stream_handle_t *handle, const char *fmt, ...) PRINTF_FUNCTION(2, 3);
|
||||||
|
|
||||||
SWITCH_END_EXTERN_C
|
SWITCH_END_EXTERN_C
|
||||||
#endif
|
#endif
|
||||||
/* For Emacs:
|
/* For Emacs:
|
||||||
|
@ -70,7 +70,7 @@ static inline switch_bool_t switch_is_digit_string(const char *s) {
|
|||||||
return SWITCH_TRUE;
|
return SWITCH_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_size_t switch_fd_read_line(int fd, char *buf, switch_size_t len);
|
SWITCH_DECLARE(switch_size_t) switch_fd_read_line(int fd, char *buf, switch_size_t len);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Evaluate the truthfullness of a string expression
|
\brief Evaluate the truthfullness of a string expression
|
||||||
|
@ -2494,9 +2494,11 @@ SWITCH_STANDARD_API(voicemail_api_function)
|
|||||||
for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||||
switch_hash_this(hi, NULL, NULL, &val);
|
switch_hash_this(hi, NULL, NULL, &val);
|
||||||
profile = (vm_profile_t *) val;
|
profile = (vm_profile_t *) val;
|
||||||
|
if (profile) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!profile) {
|
if (!profile) {
|
||||||
stream->write_function(stream, "Can't find profile.\n");
|
stream->write_function(stream, "Can't find profile.\n");
|
||||||
|
@ -552,9 +552,9 @@ abyss_bool handler_hook(TSession * r)
|
|||||||
|
|
||||||
for (i=0;i<r->response_headers.size;i++) {
|
for (i=0;i<r->response_headers.size;i++) {
|
||||||
ti=&r->response_headers.item[i];
|
ti=&r->response_headers.item[i];
|
||||||
ConnWrite(r->conn,ti->name,strlen(ti->name));
|
ConnWrite(r->conn, ti->name, (uint32_t)strlen(ti->name));
|
||||||
ConnWrite(r->conn,": ",2);
|
ConnWrite(r->conn,": ",2);
|
||||||
ConnWrite(r->conn,ti->value,strlen(ti->value));
|
ConnWrite(r->conn, ti->value, (uint32_t)strlen(ti->value));
|
||||||
ConnWrite(r->conn,CRLF,2);
|
ConnWrite(r->conn,CRLF,2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
#include <switch_version.h>
|
#include <switch_version.h>
|
||||||
#define CMD_BUFLEN 1024;
|
#define CMD_BUFLEN 1024;
|
||||||
|
|
||||||
SWITCH_DECLARE(switch_status_t) switch_console_stream_raw_write(switch_stream_handle_t *handle, uint8_t *data, switch_size_t datalen)
|
SWITCH_DECLARE_NONSTD(switch_status_t) switch_console_stream_raw_write(switch_stream_handle_t *handle, uint8_t *data, switch_size_t datalen)
|
||||||
{
|
{
|
||||||
FILE *out = switch_core_get_console();
|
FILE *out = switch_core_get_console();
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ SWITCH_DECLARE(switch_status_t) switch_console_stream_raw_write(switch_stream_ha
|
|||||||
return SWITCH_STATUS_FALSE;
|
return SWITCH_STATUS_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWITCH_DECLARE(switch_status_t) switch_console_stream_write(switch_stream_handle_t *handle, const char *fmt, ...)
|
SWITCH_DECLARE_NONSTD(switch_status_t) switch_console_stream_write(switch_stream_handle_t *handle, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
char *buf = handle->data;
|
char *buf = handle->data;
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
#include "private/switch_core_pvt.h"
|
#include "private/switch_core_pvt.h"
|
||||||
|
|
||||||
|
|
||||||
switch_size_t switch_fd_read_line(int fd, char *buf, switch_size_t len)
|
SWITCH_DECLARE(switch_size_t) switch_fd_read_line(int fd, char *buf, switch_size_t len)
|
||||||
{
|
{
|
||||||
char c, *p;
|
char c, *p;
|
||||||
int cur;
|
int cur;
|
||||||
@ -104,7 +104,7 @@ SWITCH_DECLARE(switch_status_t) switch_b64_decode(char *in, char *out, switch_si
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i=0; i<64; i++) {
|
for (i=0; i<64; i++) {
|
||||||
l64[(int)switch_b64_table[i]] = i;
|
l64[(int)switch_b64_table[i]] = (char)i;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (ip = in; ip && *ip; ip++) {
|
for (ip = in; ip && *ip; ip++) {
|
||||||
@ -117,7 +117,7 @@ SWITCH_DECLARE(switch_status_t) switch_b64_decode(char *in, char *out, switch_si
|
|||||||
l += 6;
|
l += 6;
|
||||||
|
|
||||||
while (l >= 8) {
|
while (l >= 8) {
|
||||||
op[ol++] = (b >> (l -= 8)) % 256;
|
op[ol++] = (char)((b >> (l -= 8)) % 256);
|
||||||
if (ol >= olen -2) {
|
if (ol >= olen -2) {
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user