pari: branch 2.0 r4145 - /branches/2.0/config/js/astman.js

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Wed Nov 19 12:05:27 CST 2008


Author: pari
Date: Wed Nov 19 12:05:27 2008
New Revision: 4145

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=4145
Log:

  if (Asterisk 1.6 or above){
     make sure build_action() honors updates in config files between each request
  }



Modified:
    branches/2.0/config/js/astman.js

Modified: branches/2.0/config/js/astman.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/astman.js?view=diff&rev=4145&r1=4144&r2=4145
==============================================================================
--- branches/2.0/config/js/astman.js (original)
+++ branches/2.0/config/js/astman.js Wed Nov 19 12:05:27 2008
@@ -3014,6 +3014,12 @@
 		if( !parent.sessionData.PLATFORM.isAST_1_4 && this.FILE_CONTENT != null ){
 			// the update/delete/delcat commands fail in Asterisk 1.6.X/trunk if the corresponding category/variables are not found
 			// In Asterisk 1.4 we do not have to do this check
+
+			var tmp_FILENAME = this.filename;
+			if( top.sessionData.FileCache[tmp_FILENAME].modified ){
+				this.FILE_CONTENT = config2json({ filename: tmp_FILENAME , usf:0 });
+			}
+
 			switch( action ){
 				case 'update':
 					if( !this.FILE_CONTENT.hasOwnProperty(cat) ) return s;
@@ -3033,13 +3039,6 @@
 					break;
 				default: break;
 			}
-			// TODO : handle the case where , a new category is added in 'batch 1' and is deleted in 'batch 2'
-			//		the 'delcat' in 'batch 2' would fail cause the switch does not know that the file has been changed after 'batch 1',
-			//		and even if we update the FILE_CONTENT after each start_sqreqs() it would still fail cause the batches are already generated by then
-			//	we could possibly generate the batches during callActions() and read the file before generating each batch and move this switch inside the batch
-
-			//	This should not be a problem for the time being, but I will fix this issue once i get everything else working with 'asterisk 1.4/1.6.0/trunk'
-			//	Note: this is not an issue with listOfSynActions() as clearActions() will take care of updating the file changes
 		}
 		var cnt = "" + count;
 		while(cnt.length < 6)




More information about the asterisk-gui-commits mailing list