[svn-commits] russell: branch russell/issue_13566_trunk r166269 - in /team/russell/issue_13...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Dec 22 10:08:48 CST 2008


Author: russell
Date: Mon Dec 22 10:08:48 2008
New Revision: 166269

URL: http://svn.digium.com/view/asterisk?view=rev&rev=166269
Log:
sync with trunk

Modified:
    team/russell/issue_13566_trunk/   (props changed)
    team/russell/issue_13566_trunk/funcs/func_timeout.c
    team/russell/issue_13566_trunk/main/dnsmgr.c
    team/russell/issue_13566_trunk/main/file.c

Propchange: team/russell/issue_13566_trunk/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Dec 22 10:08:48 2008
@@ -1,1 +1,1 @@
-/trunk:1-166263
+/trunk:1-166268

Modified: team/russell/issue_13566_trunk/funcs/func_timeout.c
URL: http://svn.digium.com/view/asterisk/team/russell/issue_13566_trunk/funcs/func_timeout.c?view=diff&rev=166269&r1=166268&r2=166269
==============================================================================
--- team/russell/issue_13566_trunk/funcs/func_timeout.c (original)
+++ team/russell/issue_13566_trunk/funcs/func_timeout.c Mon Dec 22 10:08:48 2008
@@ -119,11 +119,12 @@
 static int timeout_write(struct ast_channel *chan, const char *cmd, char *data,
 			 const char *value)
 {
-	double x;
-	long sec;
+	double x = 0.0;
+	long sec = 0L;
 	char timestr[64];
 	struct ast_tm myt;
-	struct timeval when;
+	struct timeval when = {0,};
+	int res;
 
 	if (!chan)
 		return -1;
@@ -136,9 +137,13 @@
 	if (!value)
 		return -1;
 
-	if ((sscanf(value, "%ld%lf", &sec, &x) == 0) || sec < 0)
+	res = sscanf(value, "%ld%lf", &sec, &x);
+	if (res == 0 || sec < 0) {
 		when.tv_sec = 0;
-	else {
+		when.tv_usec = 0;
+	} else if (res == 1) {
+		when.tv_sec = sec;
+	} else if (res == 2) {
 		when.tv_sec = sec;
 		when.tv_usec = x * 1000000;
 	}

Modified: team/russell/issue_13566_trunk/main/dnsmgr.c
URL: http://svn.digium.com/view/asterisk/team/russell/issue_13566_trunk/main/dnsmgr.c?view=diff&rev=166269&r1=166268&r2=166269
==============================================================================
--- team/russell/issue_13566_trunk/main/dnsmgr.c (original)
+++ team/russell/issue_13566_trunk/main/dnsmgr.c Mon Dec 22 10:08:48 2008
@@ -164,6 +164,8 @@
 	if (verbose)
 		ast_verb(3, "refreshing '%s'\n", entry->name);
 
+	tmp.sin_port = entry->last.sin_port;
+	
 	if (!ast_get_ip_or_srv(&tmp, entry->name, entry->service) && inaddrcmp(&tmp, &entry->last)) {
 		ast_copy_string(iabuf, ast_inet_ntoa(entry->last.sin_addr), sizeof(iabuf));
 		ast_copy_string(iabuf2, ast_inet_ntoa(tmp.sin_addr), sizeof(iabuf2));

Modified: team/russell/issue_13566_trunk/main/file.c
URL: http://svn.digium.com/view/asterisk/team/russell/issue_13566_trunk/main/file.c?view=diff&rev=166269&r1=166268&r2=166269
==============================================================================
--- team/russell/issue_13566_trunk/main/file.c (original)
+++ team/russell/issue_13566_trunk/main/file.c Mon Dec 22 10:08:48 2008
@@ -714,6 +714,10 @@
 			goto return_failure;
 		
 		fr = s->fmt->read(s, &whennext);
+		if (fr) {
+			ast_set_flag(fr, AST_FRFLAG_FROM_FILESTREAM);
+			ao2_ref(s, +1);
+		}
 		if (!fr /* stream complete */ || ast_write(s->owner, fr) /* error writing */) {
 			if (fr)
 				ast_log(LOG_WARNING, "Failed to write frame\n");
@@ -764,6 +768,10 @@
 
 	while (!whennext) {
 		struct ast_frame *fr = s->fmt->read(s, &whennext);
+		if (fr) {
+			ast_set_flag(fr, AST_FRFLAG_FROM_FILESTREAM);
+			ao2_ref(s, +1);
+		}
 		if (!fr || ast_write(s->owner, fr)) { /* no stream or error, as above */
 			if (fr)
 				ast_log(LOG_WARNING, "Failed to write frame\n");




More information about the svn-commits mailing list