[asterisk-commits] seanbright: branch group/asterisk-cpp r168430 - /team/group/asterisk-cpp/main/

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


Author: seanbright
Date: Sat Jan 10 22:01:21 2009
New Revision: 168430

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=168430
Log:
indications.c compiles

Modified:
    team/group/asterisk-cpp/main/indications.c

Modified: team/group/asterisk-cpp/main/indications.c
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/main/indications.c?view=diff&rev=168430&r1=168429&r2=168430
==============================================================================
--- team/group/asterisk-cpp/main/indications.c (original)
+++ team/group/asterisk-cpp/main/indications.c Sat Jan 10 22:01:21 2009
@@ -98,7 +98,7 @@
 
 static void playtones_release(struct ast_channel *chan, void *params)
 {
-	struct playtones_state *ps = params;
+	struct playtones_state *ps = (struct playtones_state *) params;
 
 	if (chan)
 		ast_set_write_format(chan, ps->origwfmt);
@@ -110,10 +110,10 @@
 
 static void * playtones_alloc(struct ast_channel *chan, void *params)
 {
-	struct playtones_def *pd = params;
+	struct playtones_def *pd = (struct playtones_def *) params;
 	struct playtones_state *ps = NULL;
 
-	if (!(ps = ast_calloc(1, sizeof(*ps))))
+	if (!(ps = (struct playtones_state *) ast_calloc(1, sizeof(*ps))))
 		return NULL;
 
 	ps->origwfmt = chan->writeformat;
@@ -141,14 +141,14 @@
 
 static int playtones_generator(struct ast_channel *chan, void *data, int len, int samples)
 {
-	struct playtones_state *ps = data;
+	struct playtones_state *ps = (struct playtones_state *) data;
 	struct playtones_item *pi;
 	int x;
 	/* we need to prepare a frame with 16 * timelen samples as we're 
 	 * generating SLIN audio
 	 */
 	len = samples * 2;
-	if (len > sizeof(ps->data) / 2 - 1) {
+	if (len > (int) (sizeof(ps->data) / 2 - 1)) {
 		ast_log(LOG_WARNING, "Can't generate that much data!\n");
 		return -1;
 	}
@@ -217,7 +217,7 @@
 	char *s, *data = ast_strdupa(playlst); /* cute */
 	struct playtones_def d = { vol, -1, 0, 1, NULL};
 	char *stringp;
-	char *separator;
+	const char *separator;
 	
 	if (vol < 1)
 		d.vol = 7219; /* Default to -8db */
@@ -301,7 +301,7 @@
 				freq2 = 0;
 		}
 
-		if (!(d.items = ast_realloc(d.items, (d.nitems + 1) * sizeof(*d.items)))) {
+		if (!(d.items = (struct playtones_item *) ast_realloc(d.items, (d.nitems + 1) * sizeof(*d.items)))) {
 			return -1;
 		}
 		d.items[d.nitems].fac1 = 2.0 * cos(2.0 * M_PI * (freq1 / 8000.0)) * 32768.0;
@@ -546,7 +546,7 @@
 	}
 	if (!ts) {
 		/* not there, we have to add */
-		if (!(ts = ast_calloc(1, sizeof(*ts)))) {
+		if (!(ts = (struct ind_tone_zone_sound *) ast_calloc(1, sizeof(*ts)))) {
 			AST_RWLIST_UNLOCK(&tone_zones);
 			return -2;
 		}




More information about the asterisk-commits mailing list