[svn-commits] russell: branch 1.6.2 r223490 - in /branches/1.6.2: ./ main/autoservice.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Oct 11 12:33:00 CDT 2009


Author: russell
Date: Sun Oct 11 12:32:59 2009
New Revision: 223490

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=223490
Log:
Merged revisions 223487 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r223487 | russell | 2009-10-11 12:25:42 -0500 (Sun, 11 Oct 2009) | 17 lines
  
  Merged revisions 223485-223486 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r223485 | russell | 2009-10-11 12:22:52 -0500 (Sun, 11 Oct 2009) | 6 lines
    
    Don't use data outside of its scope.
    
    The purpose of this code was to have a hangup frame put on the list of deferred
    frames.  However, the code that read the hangup frame was outside of the scope
    of where the hangup frame was declared.
  ........
    r223486 | russell | 2009-10-11 12:25:06 -0500 (Sun, 11 Oct 2009) | 2 lines
    
    Remove some unnecessary code.
  ........
................

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/main/autoservice.c

Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.2/main/autoservice.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/main/autoservice.c?view=diff&rev=223490&r1=223489&r2=223490
==============================================================================
--- branches/1.6.2/main/autoservice.c (original)
+++ branches/1.6.2/main/autoservice.c Sun Oct 11 12:32:59 2009
@@ -72,6 +72,11 @@
 
 static void *autoservice_run(void *ign)
 {
+	struct ast_frame hangup_frame = {
+		.frametype = AST_FRAME_CONTROL,
+		.subclass = AST_CONTROL_HANGUP,
+	};
+
 	for (;;) {
 		struct ast_channel *mons[MAX_AUTOMONS];
 		struct asent *ents[MAX_AUTOMONS];
@@ -114,17 +119,13 @@
 		}
 
 		f = ast_read(chan);
-	
+
 		if (!f) {
-			struct ast_frame hangup_frame = { 0, };
 			/* No frame means the channel has been hung up.
 			 * A hangup frame needs to be queued here as ast_waitfor() may
 			 * never return again for the condition to be detected outside
 			 * of autoservice.  So, we'll leave a HANGUP queued up so the
 			 * thread in charge of this channel will know. */
-
-			hangup_frame.frametype = AST_FRAME_CONTROL;
-			hangup_frame.subclass = AST_CONTROL_HANGUP;
 
 			defer_frame = &hangup_frame;
 		} else {




More information about the svn-commits mailing list