[svn-commits] branch crichter/0.3.0 r24167 - /team/crichter/0.3.0/channels/chan_misdn.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Tue May 2 06:28:17 MST 2006


Author: crichter
Date: Tue May  2 08:28:17 2006
New Revision: 24167

URL: http://svn.digium.com/view/asterisk?rev=24167&view=rev
Log:
returning 128 emtpy Frames instead of null frame. Also reverted ast_strdupa to strdup

Modified:
    team/crichter/0.3.0/channels/chan_misdn.c

Modified: team/crichter/0.3.0/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.3.0/channels/chan_misdn.c?rev=24167&r1=24166&r2=24167&view=diff
==============================================================================
--- team/crichter/0.3.0/channels/chan_misdn.c (original)
+++ team/crichter/0.3.0/channels/chan_misdn.c Tue May  2 08:28:17 2006
@@ -933,7 +933,7 @@
 		c = ast_channel_walk_locked(c);
 	}
 	if (c) {
-		ret = ast_strdupa(c->name);
+		ret = strdup(c->name);
 		ast_mutex_unlock(&c->lock);
 	} else
 		ret = NULL;
@@ -952,12 +952,12 @@
 
 	switch (pos) {
 	case 4: if (*word == 'p')
-				return ast_strdupa("port");
+				return strdup("port");
 			else if (*word == 'o')
-				return ast_strdupa("only");
+				return strdup("only");
 			break;
 	case 6: if (*word == 'o')
-				return ast_strdupa("only");
+				return strdup("only");
 			break;
 	}
 	return NULL;
@@ -1514,7 +1514,7 @@
 		}
 		
 		if ( !ast_strlen_zero(bc->rad) ) 
-			ast->cid.cid_rdnis=ast_strdupa(bc->rad);
+			ast->cid.cid_rdnis=strdup(bc->rad);
 	}
 	return 0;
 }
@@ -2072,8 +2072,17 @@
 			tmp->zero_read_cnt=0;
 
 		}
-		tmp->frame.frametype = AST_FRAME_NULL;
-		tmp->frame.subclass = 0;
+
+		/*faking Voice Frame*/
+		tmp->frame.frametype = AST_FRAME_VOICE;
+		tmp->frame.subclass = AST_FORMAT_ALAW;
+		
+		memset(tmp->ast_rd_buf,0,128);
+		tmp->frame.data = tmp->ast_rd_buf ;
+		tmp->frame.mallocd =0 ;
+		tmp->frame.datalen = 128;
+		tmp->frame.samples = 128;
+		
 		frame=ast_frisolate(&tmp->frame);
 		return frame;
 	}
@@ -2120,7 +2129,7 @@
 	}
 	
 	if (ch->notxtone) {
-		chan_misdn_log(5, ch->bc->port, "misdn_write: Returning because notxone\n");
+		chan_misdn_log(9, ch->bc->port, "misdn_write: Returning because notxone\n");
 		return 0;
 	}
 



More information about the svn-commits mailing list