Merged revisions 119354 via svnmerge from
authorJoshua Colp <jcolp@digium.com>
Fri, 30 May 2008 19:47:30 +0000 (19:47 +0000)
committerJoshua Colp <jcolp@digium.com>
Fri, 30 May 2008 19:47:30 +0000 (19:47 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r119354 | file | 2008-05-30 16:46:37 -0300 (Fri, 30 May 2008) | 2 lines

Fix a bug I found while testing for another issue.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@119355 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/autoservice.c

index df475fa..636e95d 100644 (file)
@@ -155,21 +155,20 @@ static void *autoservice_run(void *ign)
                        continue;
                }
 
-               for (i = 0; i < x; i++) {
-                       struct ast_frame *dup_f;
-
-                       if (mons[i] != chan) {
-                               continue;
-                       }
-
-                       if ((dup_f = ast_frdup(f))) {
-                               AST_LIST_INSERT_TAIL(&ents[i]->deferred_frames, dup_f, frame_list);
-                       }
-                       
-                       break;
-               }
-
                if (f) {
+                       for (i = 0; i < x; i++) {
+                               struct ast_frame *dup_f;
+                               
+                               if (mons[i] != chan) {
+                                       continue;
+                               }
+                               
+                               if ((dup_f = ast_frdup(f))) {
+                                       AST_LIST_INSERT_TAIL(&ents[i]->deferred_frames, dup_f, frame_list);
+                               }
+                               
+                               break;
+                       }
                        ast_frfree(f);
                }
        }