Merge pull request #51 from albertmata/master
Corrected a bug in ManagerConnection.BuildAction and change version detection regex.
This commit is contained in:
commit
91d0c8d10b
|
@ -18,8 +18,8 @@ namespace AsterNET
|
|||
/// <summary>Line separator</summary>
|
||||
public const string LINE_SEPARATOR = "\r\n";
|
||||
|
||||
public static Regex ASTERISK_VERSION = new Regex("^Asterisk\\s+\\D*([0-9]+.[0-9]+.[0-9]+|[1-9][0-9]-r[0-9]+).*$",
|
||||
RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
public static Regex ASTERISK_VERSION = new Regex( "^Asterisk\\s+\\D*([0-9]+.[0-9]+.[0-9]+|[1-9][0-9]-r[0-9]+|[0-9]+.[0-9]+-cert[0-9]).*$",
|
||||
RegexOptions.Compiled | RegexOptions.IgnoreCase );
|
||||
|
||||
public static Regex SHOW_VERSION_FILES_PATTERN = new Regex("^([\\S]+)\\s+Revision: ([0-9\\.]+)");
|
||||
public static char[] RESPONSE_KEY_VALUE_SEPARATOR = {':'};
|
||||
|
|
|
@ -2162,9 +2162,13 @@ namespace AsterNET.Manager
|
|||
}
|
||||
|
||||
IActionVariable actionVar = action as IActionVariable;
|
||||
if(actionVar != null && actionVar.GetVariables().Count > 0)
|
||||
if ( actionVar != null )
|
||||
{
|
||||
sb.Append(string.Concat("Variable: ", Helper.JoinVariables(actionVar.GetVariables(), VAR_DELIMITER, "="), Common.LINE_SEPARATOR));
|
||||
var variables = actionVar.GetVariables();
|
||||
if ( variables != null && variables.Count > 0 )
|
||||
{
|
||||
sb.Append( string.Concat( "Variable: ", Helper.JoinVariables( actionVar.GetVariables(), VAR_DELIMITER, "=" ), Common.LINE_SEPARATOR ) );
|
||||
}
|
||||
}
|
||||
|
||||
sb.Append(Common.LINE_SEPARATOR);
|
||||
|
|
Loading…
Reference in a new issue