summaryrefslogtreecommitdiff
path: root/CSharp/Ivy/IvyPPC
diff options
context:
space:
mode:
Diffstat (limited to 'CSharp/Ivy/IvyPPC')
-rw-r--r--CSharp/Ivy/IvyPPC/IvyClient.cs30
1 files changed, 19 insertions, 11 deletions
diff --git a/CSharp/Ivy/IvyPPC/IvyClient.cs b/CSharp/Ivy/IvyPPC/IvyClient.cs
index 1a5a350..3110a3e 100644
--- a/CSharp/Ivy/IvyPPC/IvyClient.cs
+++ b/CSharp/Ivy/IvyPPC/IvyClient.cs
@@ -84,7 +84,7 @@ namespace IvyBus
private int clientPriority; /* client priority */
private volatile Thread clientThread; // volatile to ensure the quick communication
- private bool doping = false;
+ private bool doping; // false by runtime default
private const int PINGTIMEOUT = 5000;
private volatile Thread pingerThread;
@@ -384,16 +384,24 @@ namespace IvyBus
{
try
{
- lock( bindings )
- {
- IvyBindingBase binding;
- if (bind.type == Ivy.BindingType.BindRegexp)
- binding = new IvyBindingRegexp(bind.key, bind.expression);
- else
- binding = new IvyBindingSimple(bind.key, bind.expression);
- bindings.Add( bind.key, binding);
- }
- bus.FireClientAddBinding( this, bind.expression );
+ if (bind.type == Ivy.BindingType.BindRegexp && !bus.CheckRegexp(bind.expression) )
+ {
+ bus.FireClientFilterBinding(this, bind.expression);
+ return;
+ }
+ lock (bindings)
+ {
+ IvyBindingBase binding;
+ if (bind.type == Ivy.BindingType.BindRegexp)
+ {
+ binding = new IvyBindingRegexp(bind.key, bind.expression);
+ }
+ else
+ binding = new IvyBindingSimple(bind.key, bind.expression);
+ bindings.Add(bind.key, binding);
+ }
+ bus.FireClientAddBinding(this, bind.expression);
+
}
catch (ArgumentException e)
{