[Asterisk-cvs] asterisk app.c, 1.61, 1.62 channel.c, 1.198, 1.199 file.c, 1.64, 1.65 pbx.c, 1.249, 1.250

kpfleming at lists.digium.com kpfleming at lists.digium.com
Sun Jun 5 11:02:08 CDT 2005


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv1706

Modified Files:
	app.c channel.c file.c pbx.c 
Log Message:
make ast_waitstream_* return value compatible with platforms that use unsigned char by default (bug #4455)


Index: app.c
===================================================================
RCS file: /usr/cvsroot/asterisk/app.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- app.c	25 May 2005 10:57:15 -0000	1.61
+++ app.c	5 Jun 2005 15:04:43 -0000	1.62
@@ -513,7 +513,8 @@
 
 int ast_play_and_record(struct ast_channel *chan, const char *playfile, const char *recordfile, int maxtime, const char *fmt, int *duration, int silencethreshold, int maxsilence, const char *path)
 {
-	char d, *fmts;
+	int d;
+	char *fmts;
 	char comment[256];
 	int x, fmtcnt=1, res=-1,outmsg=0;
 	struct ast_frame *f;
@@ -730,7 +731,8 @@
 
 int ast_play_and_prepend(struct ast_channel *chan, char *playfile, char *recordfile, int maxtime, char *fmt, int *duration, int beep, int silencethreshold, int maxsilence)
 {
-	char d = 0, *fmts;
+	int d = 0;
+	char *fmts;
 	char comment[256];
 	int x, fmtcnt=1, res=-1,outmsg=0;
 	struct ast_frame *f;

Index: channel.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channel.c,v
retrieving revision 1.198
retrieving revision 1.199
diff -u -d -r1.198 -r1.199
--- channel.c	5 Jun 2005 14:32:32 -0000	1.198
+++ channel.c	5 Jun 2005 15:04:43 -0000	1.199
@@ -1235,11 +1235,11 @@
 	return ms;
 }
 
-char ast_waitfordigit(struct ast_channel *c, int ms)
+int ast_waitfordigit(struct ast_channel *c, int ms)
 {
 	/* XXX Should I be merged with waitfordigit_full XXX */
 	struct ast_frame *f;
-	char result = 0;
+	int result = 0;
 	/* Stop if we're a zombie or need a soft hangup */
 	if (ast_test_flag(c, AST_FLAG_ZOMBIE) || ast_check_hangup(c)) 
 		return -1;
@@ -1279,7 +1279,7 @@
 #endif	
 	return res;
 }
-char ast_waitfordigit_full(struct ast_channel *c, int ms, int audiofd, int cmdfd)
+int ast_waitfordigit_full(struct ast_channel *c, int ms, int audiofd, int cmdfd)
 {
 	struct ast_frame *f;
 	struct ast_channel *rchan;
@@ -2188,7 +2188,7 @@
 {
 	int pos=0;
 	int to = ftimeout;
-	char d;
+	int d;
 	/* XXX Merge with full version? XXX */
 	/* Stop if we're a zombie or need a soft hangup */
 	if (ast_test_flag(c, AST_FLAG_ZOMBIE) || ast_check_hangup(c)) 
@@ -2227,7 +2227,7 @@
 {
 	int pos=0;
 	int to = ftimeout;
-	char d;
+	int d;
 	/* Stop if we're a zombie or need a soft hangup */
 	if (ast_test_flag(c, AST_FLAG_ZOMBIE) || ast_check_hangup(c)) 
 		return -1;

Index: file.c
===================================================================
RCS file: /usr/cvsroot/asterisk/file.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- file.c	2 Jun 2005 21:26:02 -0000	1.64
+++ file.c	5 Jun 2005 15:04:43 -0000	1.65
@@ -934,7 +934,7 @@
 	return fs;
 }
 
-char ast_waitstream(struct ast_channel *c, const char *breakon)
+int ast_waitstream(struct ast_channel *c, const char *breakon)
 {
 	/* XXX Maybe I should just front-end ast_waitstream_full ? XXX */
 	int res;
@@ -990,7 +990,7 @@
 	return (c->_softhangup ? -1 : 0);
 }
 
-char ast_waitstream_fr(struct ast_channel *c, const char *breakon, const char *forward, const char *rewind, int ms)
+int ast_waitstream_fr(struct ast_channel *c, const char *breakon, const char *forward, const char *rewind, int ms)
 {
 	int res;
 	struct ast_frame *fr;
@@ -1059,7 +1059,7 @@
 	return (c->_softhangup ? -1 : 0);
 }
 
-char ast_waitstream_full(struct ast_channel *c, const char *breakon, int audiofd, int cmdfd)
+int ast_waitstream_full(struct ast_channel *c, const char *breakon, int audiofd, int cmdfd)
 {
 	int res;
 	int ms;

Index: pbx.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx.c,v
retrieving revision 1.249
retrieving revision 1.250
diff -u -d -r1.249 -r1.250
--- pbx.c	3 Jun 2005 03:09:20 -0000	1.249
+++ pbx.c	5 Jun 2005 15:04:43 -0000	1.250
@@ -2238,7 +2238,7 @@
 static int __ast_pbx_run(struct ast_channel *c)
 {
 	int firstpass = 1;
-	char digit;
+	int digit;
 	char exten[256];
 	int pos;
 	int waittime;




More information about the svn-commits mailing list