*** say.c	Tue Dec 21 15:12:23 2004
--- say.c.new	Tue Dec 21 15:19:52 2004
***************
*** 682,688 ****
  		}
  		if (!res) {
  			if(!ast_streamfile(chan, fn, language)) {
! 				if (audiofd && ctrlfd) 
  					res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
  				else  
  					res = ast_waitstream(chan, ints);
--- 682,688 ----
  		}
  		if (!res) {
  			if(!ast_streamfile(chan, fn, language)) {
! 				if ((audiofd > -1) && (ctrlfd > -1))
  					res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
  				else  
  					res = ast_waitstream(chan, ints);
***************
*** 791,804 ****
  		}
  		if (!res) {
  			if(!ast_streamfile(chan, fn, language)) {
! 				if (audiofd && ctrlfd) 
  					res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
  				else  
  					res = ast_waitstream(chan, ints);
  			}
  			ast_stopstream(chan);
  			if(!ast_streamfile(chan, fna, language)) {
! 				if (audiofd && ctrlfd) 
  					res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
  				else  
  					res = ast_waitstream(chan, ints);
--- 791,804 ----
  		}
  		if (!res) {
  			if(!ast_streamfile(chan, fn, language)) {
! 				if ((audiofd > -1) && (ctrlfd > -1))
  					res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
  				else  
  					res = ast_waitstream(chan, ints);
  			}
  			ast_stopstream(chan);
  			if(!ast_streamfile(chan, fna, language)) {
! 				if ((audiofd > -1) && (ctrlfd > -1))
  					res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
  				else  
  					res = ast_waitstream(chan, ints);
***************
*** 881,887 ****
  
  		if (!res) {
  			if(!ast_streamfile(chan, fn, language)) {
! 				if (audiofd && ctrlfd)
  					res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
  				else
  					res = ast_waitstream(chan, ints);
--- 881,887 ----
  
  		if (!res) {
  			if(!ast_streamfile(chan, fn, language)) {
! 				if ((audiofd > -1) && (ctrlfd > -1))
  					res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
  				else
  					res = ast_waitstream(chan, ints);
***************
*** 967,973 ****
  		}
  		if (!res) {
  			if(!ast_streamfile(chan, fn, language)) {
! 				if (audiofd && ctrlfd)
  					res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
  				else
  					res = ast_waitstream(chan, ints);
--- 967,973 ----
  		}
  		if (!res) {
  			if(!ast_streamfile(chan, fn, language)) {
! 				if ((audiofd > -1) && (ctrlfd > -1))
  					res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
  				else
  					res = ast_waitstream(chan, ints);
***************
*** 1113,1119 ****
  			}
  			if (!res) {
  				if(!ast_streamfile(chan, fn, language)) {
! 					if (audiofd && ctrlfd)
  						res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
  					else
  						res = ast_waitstream(chan, ints);
--- 1113,1119 ----
  			}
  			if (!res) {
  				if(!ast_streamfile(chan, fn, language)) {
! 					if ((audiofd > -1) && (ctrlfd > -1))
  						res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
  					else
  						res = ast_waitstream(chan, ints);
***************
*** 1183,1189 ****
  
  		if (!res) {
  			if(!ast_streamfile(chan, fn, language)) {
! 				if (audiofd && ctrlfd)
  					res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
  				else
  					res = ast_waitstream(chan, ints);
--- 1183,1189 ----
  
  		if (!res) {
  			if(!ast_streamfile(chan, fn, language)) {
! 				if ((audiofd > -1) && (ctrlfd > -1))
  					res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
  				else
  					res = ast_waitstream(chan, ints);
***************
*** 1238,1244 ****
  	strcat(file_name, fn);
  	ast_log(LOG_DEBUG, "Trying to play: %s\n", file_name);
  	if (!ast_streamfile(chan, file_name, language)) {
! 		if (audiofd && ctrlfd)
  			ast_waitstream_full(chan, ints, audiofd, ctrlfd);
  		else
  			ast_waitstream(chan, ints);
--- 1238,1244 ----
  	strcat(file_name, fn);
  	ast_log(LOG_DEBUG, "Trying to play: %s\n", file_name);
  	if (!ast_streamfile(chan, file_name, language)) {
! 		if ((audiofd > -1) && (ctrlfd > -1))
  			ast_waitstream_full(chan, ints, audiofd, ctrlfd);
  		else
  			ast_waitstream(chan, ints);
***************
*** 1568,1574 ****
  		}
  		if (!res) {
  			if(!ast_streamfile(chan, fn, language)) {
! 				if (audiofd && ctrlfd)
  					res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);			else
  					res = ast_waitstream(chan, ints);
  			}
--- 1568,1574 ----
  		}
  		if (!res) {
  			if(!ast_streamfile(chan, fn, language)) {
! 				if ((audiofd > -1) && (ctrlfd > -1))
  					res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);			else
  					res = ast_waitstream(chan, ints);
  			}
***************
*** 1638,1644 ****
  			}
  			 if (!res) {
                                  if(!ast_streamfile(chan, fn, language)) {
!                                     if (audiofd && ctrlfd)
                                          res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
                                      else
                                           res = ast_waitstream(chan, ints);
--- 1638,1644 ----
  			}
  			 if (!res) {
                                  if(!ast_streamfile(chan, fn, language)) {
!                                     if ((audiofd > -1) && (ctrlfd > -1))
                                          res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
                                      else
                                           res = ast_waitstream(chan, ints);
***************
*** 1699,1705 ****
  			}
  			if (!res) {
  				if(!ast_streamfile(chan, fn, language)) {
! 					if (audiofd && ctrlfd)
  						res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
  					else
  						res = ast_waitstream(chan, ints);
--- 1699,1705 ----
  			}
  			if (!res) {
  				if(!ast_streamfile(chan, fn, language)) {
! 					if ((audiofd > -1) && (ctrlfd > -1))
  						res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
  					else
  						res = ast_waitstream(chan, ints);
***************
*** 1808,1814 ****
  		}
  		if (!res) {
  			if(!ast_streamfile(chan, fn, language)) {
! 				if (audiofd && ctrlfd) {
  					res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
  				} else {
  					res = ast_waitstream(chan, ints);
--- 1808,1814 ----
  		}
  		if (!res) {
  			if(!ast_streamfile(chan, fn, language)) {
! 				if ((audiofd > -1) && (ctrlfd > -1)) {
  					res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
  				} else {
  					res = ast_waitstream(chan, ints);
