[Freeswitch-svn] [commit] r6421 - in freeswitch/trunk/src: . include mod/applications/mod_voicemail mod/xml_int/mod_xml_rpc

Freeswitch SVN mikej at freeswitch.org
Wed Nov 28 17:27:33 EST 2007


Author: mikej
Date: Wed Nov 28 17:27:33 2007
New Revision: 6421

Modified:
   freeswitch/trunk/src/include/switch_console.h
   freeswitch/trunk/src/include/switch_utils.h
   freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c
   freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
   freeswitch/trunk/src/switch_console.c
   freeswitch/trunk/src/switch_utils.c

Log:
fix windows build

Modified: freeswitch/trunk/src/include/switch_console.h
==============================================================================
--- freeswitch/trunk/src/include/switch_console.h	(original)
+++ freeswitch/trunk/src/include/switch_console.h	Wed Nov 28 17:27:33 2007
@@ -64,12 +64,13 @@
 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);
 
-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
 */
-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
 #endif
 /* For Emacs:

Modified: freeswitch/trunk/src/include/switch_utils.h
==============================================================================
--- freeswitch/trunk/src/include/switch_utils.h	(original)
+++ freeswitch/trunk/src/include/switch_utils.h	Wed Nov 28 17:27:33 2007
@@ -70,7 +70,7 @@
 	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

Modified: freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c	Wed Nov 28 17:27:33 2007
@@ -2494,7 +2494,9 @@
         for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
             switch_hash_this(hi, NULL, NULL, &val);
             profile = (vm_profile_t *) val;
-            break;
+			if (profile) {
+	            break;
+			}
         }
     }
 

Modified: freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
==============================================================================
--- freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c	(original)
+++ freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c	Wed Nov 28 17:27:33 2007
@@ -552,9 +552,9 @@
 
 	for (i=0;i<r->response_headers.size;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,ti->value,strlen(ti->value));
+		ConnWrite(r->conn, ti->value, (uint32_t)strlen(ti->value));
 		ConnWrite(r->conn,CRLF,2);
 	}
 

Modified: freeswitch/trunk/src/switch_console.c
==============================================================================
--- freeswitch/trunk/src/switch_console.c	(original)
+++ freeswitch/trunk/src/switch_console.c	Wed Nov 28 17:27:33 2007
@@ -34,7 +34,7 @@
 #include <switch_version.h>
 #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();
 
@@ -46,7 +46,7 @@
 	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;
 	char *buf = handle->data;

Modified: freeswitch/trunk/src/switch_utils.c
==============================================================================
--- freeswitch/trunk/src/switch_utils.c	(original)
+++ freeswitch/trunk/src/switch_utils.c	Wed Nov 28 17:27:33 2007
@@ -36,7 +36,7 @@
 #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;
 	int cur;
@@ -104,7 +104,7 @@
 	}
 
 	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++) {
@@ -117,7 +117,7 @@
 		l += 6;
 
 		while (l >= 8) {
-			op[ol++] = (b >> (l -= 8)) % 256;
+			op[ol++] = (char)((b >> (l -= 8)) % 256);
 			if (ol >= olen -2) {
 				goto end;
 			}



More information about the Freeswitch-svn mailing list