diff options
author | fcolin | 2007-02-01 09:58:47 +0000 |
---|---|---|
committer | fcolin | 2007-02-01 09:58:47 +0000 |
commit | 101d33cf720a21a99044ad9dbebc495c5872f930 (patch) | |
tree | 9a042377907545d5f4c1e570f70ca60dd7088c7d /CSharp/Ivy/IvyPPC/IvyClient.cs | |
parent | 0eaf5cecce8bdca51fa113bae4560a8e32975028 (diff) | |
download | ivy-csharp-101d33cf720a21a99044ad9dbebc495c5872f930.zip ivy-csharp-101d33cf720a21a99044ad9dbebc495c5872f930.tar.gz ivy-csharp-101d33cf720a21a99044ad9dbebc495c5872f930.tar.bz2 ivy-csharp-101d33cf720a21a99044ad9dbebc495c5872f930.tar.xz |
Utilisateur : Fcolin Date : 20/04/06 Heure : 13:15 Archivé dans $/CSharp/Ivy/Ivy Commentaire: filtrage classes (vss 43)
Diffstat (limited to 'CSharp/Ivy/IvyPPC/IvyClient.cs')
-rw-r--r-- | CSharp/Ivy/IvyPPC/IvyClient.cs | 30 |
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)
{
|