[asterisk-commits] seanbright: branch group/asterisk-cpp r168433 - in /team/group/asterisk-cpp: ...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Jan 10 22:38:40 CST 2009


Author: seanbright
Date: Sat Jan 10 22:38:40 2009
New Revision: 168433

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=168433
Log:
A few more files.

Modified:
    team/group/asterisk-cpp/include/asterisk/manager.h
    team/group/asterisk-cpp/main/cryptostub.c
    team/group/asterisk-cpp/main/netsock.c
    team/group/asterisk-cpp/main/slinfactory.c
    team/group/asterisk-cpp/main/utils.c

Modified: team/group/asterisk-cpp/include/asterisk/manager.h
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/include/asterisk/manager.h?view=diff&rev=168433&r1=168432&r2=168433
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/manager.h (original)
+++ team/group/asterisk-cpp/include/asterisk/manager.h Sat Jan 10 22:38:40 2009
@@ -186,19 +186,19 @@
 							   const char *contents, ...);
 
 /*! \brief Get header from mananger transaction */
-const char *astman_get_header(const struct message *m, char *var);
+const char *astman_get_header(const struct message *m, const char *var);
 
 /*! \brief Get a linked list of the Variable: headers */
 struct ast_variable *astman_get_variables(const struct message *m);
 
 /*! \brief Send error in manager transaction */
-void astman_send_error(struct mansession *s, const struct message *m, char *error);
+void astman_send_error(struct mansession *s, const struct message *m, const char *error);
 
 /*! \brief Send response in manager transaction */
 void astman_send_response(struct mansession *s, const struct message *m, char *resp, char *msg);
 
 /*! \brief Send ack in manager transaction */
-void astman_send_ack(struct mansession *s, const struct message *m, char *msg);
+void astman_send_ack(struct mansession *s, const struct message *m, const char *msg);
 
 /*! \brief Send ack in manager list transaction */
 void astman_send_listack(struct mansession *s, const struct message *m, char *msg, char *listflag);

Modified: team/group/asterisk-cpp/main/cryptostub.c
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/main/cryptostub.c?view=diff&rev=168433&r1=168432&r2=168433
==============================================================================
--- team/group/asterisk-cpp/main/cryptostub.c (original)
+++ team/group/asterisk-cpp/main/cryptostub.c Sat Jan 10 22:38:40 2009
@@ -27,7 +27,7 @@
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
-#include "asterisk/crypto.h"
+/* #include "asterisk/crypto.h" */
 #include "asterisk/logger.h"
 
 static struct ast_key *stub_ast_key_get(const char *kname, int ktype)

Modified: team/group/asterisk-cpp/main/netsock.c
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/main/netsock.c?view=diff&rev=168433&r1=168432&r2=168433
==============================================================================
--- team/group/asterisk-cpp/main/netsock.c (original)
+++ team/group/asterisk-cpp/main/netsock.c Sat Jan 10 22:38:40 2009
@@ -66,7 +66,7 @@
 
 struct ast_netsock_list *ast_netsock_list_alloc(void)
 {
-	return ast_calloc(1, sizeof(struct ast_netsock_list));
+	return (struct ast_netsock_list *) ast_calloc(1, sizeof(struct ast_netsock_list));
 }
 
 int ast_netsock_init(struct ast_netsock_list *list)
@@ -128,7 +128,7 @@
 		
 	ast_enable_packet_fragmentation(netsocket);
 
-	if (!(ns = ast_calloc(1, sizeof(*ns)))) {
+	if (!(ns = (struct ast_netsock *) ast_calloc(1, sizeof(*ns)))) {
 		close(netsocket);
 		return NULL;
 	}

Modified: team/group/asterisk-cpp/main/slinfactory.c
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/main/slinfactory.c?view=diff&rev=168433&r1=168432&r2=168433
==============================================================================
--- team/group/asterisk-cpp/main/slinfactory.c (original)
+++ team/group/asterisk-cpp/main/slinfactory.c Sat Jan 10 22:38:40 2009
@@ -83,7 +83,7 @@
 	unsigned int x;
 
 	if (f->subclass != AST_FORMAT_SLINEAR && f->subclass != AST_FORMAT_SLINEAR16) {
-		if (sf->trans && f->subclass != sf->format) {
+		if (sf->trans && f->subclass != (int) sf->format) {
 			ast_translator_free_path(sf->trans);
 			sf->trans = NULL;
 		}
@@ -161,9 +161,9 @@
 		}
 		
 		if ((frame_ptr = AST_LIST_REMOVE_HEAD(&sf->queue, frame_list))) {
-			frame_data = frame_ptr->data.ptr;
+			frame_data = (short *) frame_ptr->data.ptr;
 			
-			if (frame_ptr->samples <= ineed) {
+			if (frame_ptr->samples <= (int) ineed) {
 				memcpy(offset, frame_data, frame_ptr->samples * sizeof(*offset));
 				sofar += frame_ptr->samples;
 				offset += frame_ptr->samples;

Modified: team/group/asterisk-cpp/main/utils.c
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/main/utils.c?view=diff&rev=168433&r1=168432&r2=168433
==============================================================================
--- team/group/asterisk-cpp/main/utils.c (original)
+++ team/group/asterisk-cpp/main/utils.c Sat Jan 10 22:38:40 2009
@@ -205,7 +205,7 @@
 			return NULL;
 		memset(hp, 0, sizeof(struct ast_hostent));
 		hp->hp.h_addrtype = AF_INET;
-		hp->hp.h_addr_list = (void *) hp->buf;
+		hp->hp.h_addr_list = (char **) hp->buf;
 		hp->hp.h_addr = hp->buf + sizeof(void *);
 		if (inet_pton(AF_INET, host, hp->hp.h_addr) > 0)
 			return &hp->hp;
@@ -382,7 +382,7 @@
 */
 char *ast_uri_encode(const char *string, char *outbuf, int buflen, int doreserved) 
 {
-	char *reserved = ";/?:@&=+$,# ";	/* Reserved chars */
+	const char *reserved = ";/?:@&=+$,# ";	/* Reserved chars */
 
  	const char *ptr  = string;	/* Start with the string */
 	char *out = NULL;
@@ -432,7 +432,7 @@
 {
 	char *buf;
 
-	if (!(buf = ast_threadstorage_get(&inet_ntoa_buf, INET_ADDRSTRLEN)))
+	if (!(buf = (char *) ast_threadstorage_get(&inet_ntoa_buf, INET_ADDRSTRLEN)))
 		return "";
 
 	return inet_ntop(AF_INET, &ia, buf, INET_ADDRSTRLEN);
@@ -983,7 +983,7 @@
 #endif
 
 	if (!attr) {
-		attr = alloca(sizeof(*attr));
+		attr = (pthread_attr_t *) alloca(sizeof(*attr));
 		pthread_attr_init(attr);
 	}
 
@@ -1006,7 +1006,7 @@
 		ast_log(LOG_WARNING, "pthread_attr_setstacksize: %s\n", strerror(errno));
 
 #if !defined(LOW_MEMORY)
-	if ((a = ast_malloc(sizeof(*a)))) {
+	if ((a = (struct thr_arg *) ast_malloc(sizeof(*a)))) {
 		a->start_routine = start_routine;
 		a->data = data;
 		start_routine = dummy_start;
@@ -1031,7 +1031,7 @@
 	int res;
 
 	if (!attr) {
-		attr = alloca(sizeof(*attr));
+		attr = (pthread_attr_t *) alloca(sizeof(*attr));
 		pthread_attr_init(attr);
 		attr_destroy = 1;
 	}
@@ -1060,8 +1060,8 @@
 static int ast_wait_for_output(int fd, int timeoutms)
 {
 	struct pollfd pfd = {
-		.fd = fd,
-		.events = POLLOUT,
+        fd,
+		POLLOUT
 	};
 	int res;
 	struct timeval start = ast_tvnow();
@@ -1277,7 +1277,7 @@
 
 int ast_build_string_va(char **buffer, size_t *space, const char *fmt, va_list ap)
 {
-	int result;
+	size_t result;
 
 	if (!buffer || !*buffer || !space || !*space)
 		return -1;
@@ -1448,7 +1448,8 @@
 
 void ast_join(char *s, size_t len, char * const w[])
 {
-	int x, ofs = 0;
+	int x;
+    size_t ofs = 0;
 	const char *src;
 
 	/* Join words into a string */
@@ -1481,7 +1482,7 @@
 {
 	struct ast_string_field_pool *pool;
 
-	if (!(pool = ast_calloc(1, sizeof(*pool) + size)))
+	if (!(pool = (struct ast_string_field_pool *) ast_calloc(1, sizeof(*pool) + size)))
 		return -1;
 	
 	pool->prev = *pool_head;
@@ -1565,7 +1566,7 @@
 int __ast_string_field_ptr_grow(struct ast_string_field_mgr *mgr, size_t needed,
 				const ast_string_field *ptr)
 {
-	int grow = needed - (strlen(*ptr) + 1);
+	size_t grow = needed - (strlen(*ptr) + 1);
 	size_t space = mgr->size - mgr->used;
 
 	if (grow <= 0) {
@@ -1713,7 +1714,7 @@
 	int len = strlen(path), count = 0, x, piececount = 0;
 	char *tmp = ast_strdupa(path);
 	char **pieces;
-	char *fullpath = alloca(len + 1);
+	char *fullpath = (char *) alloca(len + 1);
 	int res = 0;
 
 	for (ptr = tmp; *ptr; ptr++) {
@@ -1722,7 +1723,7 @@
 	}
 
 	/* Count the components to the directory path */
-	pieces = alloca(count * sizeof(*pieces));
+	pieces = (char **) alloca(count * sizeof(*pieces));
 	for (ptr = tmp; *ptr; ptr++) {
 		if (*ptr == '/') {
 			*ptr = '\0';




More information about the asterisk-commits mailing list