summaryrefslogtreecommitdiff
path: root/src/ivy.c
diff options
context:
space:
mode:
authorfcolin2006-06-22 10:47:46 +0000
committerfcolin2006-06-22 10:47:46 +0000
commit19735bb3c818f78d5ce53d1482b0bd62f63d76e8 (patch)
tree83d31fac54f300c02b84930bb8cd65fcf6c56e96 /src/ivy.c
parent91c16c398d72cb2099294d86f4e9cbaf12a3d3da (diff)
downloadivy-c-19735bb3c818f78d5ce53d1482b0bd62f63d76e8.zip
ivy-c-19735bb3c818f78d5ce53d1482b0bd62f63d76e8.tar.gz
ivy-c-19735bb3c818f78d5ce53d1482b0bd62f63d76e8.tar.bz2
ivy-c-19735bb3c818f78d5ce53d1482b0bd62f63d76e8.tar.xz
Ajout d'un warning si la variable IVY_DEBUG_FILTER est postionne
et que le message n'est pas emit , on controle la table des filtres ajout d'un flag -c a ivyprobe pour la gestion des filtres de regexps
Diffstat (limited to 'src/ivy.c')
-rw-r--r--src/ivy.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/ivy.c b/src/ivy.c
index e4cbb04..fd5204b 100644
--- a/src/ivy.c
+++ b/src/ivy.c
@@ -93,6 +93,9 @@ struct _clnt_lst {
unsigned short app_port; /* port de l'application */
};
+/* flag pour le debug en cas de Filter de regexp */
+int debug_filter = 0;
+
/* server pour la socket application */
static Server server;
@@ -585,6 +588,8 @@ void IvySetBindCallback( IvyBindCallback bind_callback, void *bind_data )
void IvySetFilter( int argc, const char **argv)
{
IvyBindingSetFilter( argc, argv );
+ if ( getenv( "IVY_DEBUG_FILTER" )) debug_filter = 1;
+
}
void IvyStop (void)
@@ -749,7 +754,7 @@ IvyBindMsg (MsgCallback callback, void *user_data, const char *fmt_regex, ... )
}
return msg;
}
-
+/* emmission d'un message avec formatage a la printf */
int IvySendMsg(const char *fmt, ...)
{
IvyClientPtr clnt;
@@ -768,6 +773,11 @@ int IvySendMsg(const char *fmt, ...)
match_count += ClientCall (clnt, buffer.data);
}
TRACE_IF( match_count == 0, "Warning no recipient for %s\n",buffer.data);
+ /* si le message n'est pas emit et qu'il y a des filtres alors WARNING */
+ if ( match_count == 0 && debug_filter )
+ {
+ IvyBindindFilterCheck( buffer.data );
+ }
return match_count;
}