From 6ca781b8a38474ab428d5fcb3b489dfe3e974334 Mon Sep 17 00:00:00 2001 From: bustico Date: Fri, 21 Mar 2008 09:03:34 +0000 Subject: - numerous fixes - socket in non blocking mode (resolve some deadlock, and agent are immune to another agent beeing blocked) --- src/ivybind.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'src/ivybind.c') diff --git a/src/ivybind.c b/src/ivybind.c index 6c74af7..60be1ba 100644 --- a/src/ivybind.c +++ b/src/ivybind.c @@ -67,6 +67,11 @@ static IvyBinding token_extract; IvyBinding IvyBindingCompile( const char * expression, int *erroffset, const char **errmessage ) { +/* static int called = 0; */ +/* called ++; */ +/* if ((called %1000) == 0) { */ +/* printf ("DBG> IvyBindingCompile called =%d\n", called); */ +/* } */ IvyBinding bind=0; #ifdef USE_PCRE_REGEX pcre *regexp; @@ -117,15 +122,22 @@ IvyBinding IvyBindingCompile( const char * expression, int *erroffset, const ch void IvyBindingFree( IvyBinding bind ) { +/* static int called = 0; */ +/* called ++; */ +/* if ((called %1000) == 0) { */ +/* printf ("DBG> IvyBindingFree called =%d\n", called); */ +/* } */ #ifdef USE_PCRE_REGEX - if (bind->inspect!=NULL) - pcre_free(bind->inspect); - pcre_free(bind->regexp); + if (bind->inspect!=NULL) + pcre_free(bind->inspect); + pcre_free(bind->regexp); #else /* we don't USE_PCRE_REGEX */ - free( bind->regexp ); + free( bind->regexp ); #endif /* USE_PCRE_REGEX */ - free ( bind ); + free ( bind ); } + + int IvyBindingExec( IvyBinding bind, const char * message ) { int nb_match = 0; -- cgit v1.1