]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
automerge commit
authorAutomerge script <automerge@asterisk.org>
Thu, 30 Mar 2006 18:01:47 +0000 (18:01 +0000)
committerAutomerge script <automerge@asterisk.org>
Thu, 30 Mar 2006 18:01:47 +0000 (18:01 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@16545 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_musiconhold.c

index 2a27dcec8a953f2c5714fc4db676fad8ccdb6ee4..97ae3d8712960ed9841262bbfeb40e990d4a8032 100644 (file)
@@ -778,6 +778,11 @@ static int moh_scan_files(struct mohclass *class) {
 
                if (i == class->total_files)
                        strcpy(class->filearray[class->total_files++], filepath);
+
+               /* If the new total files is equal to the maximum allowed, stop adding new ones */
+               if (class->total_files == MAX_MOHFILES)
+                       break;
+
        }
 
        closedir(files_DIR);