diff --git a/phoned/filters.c b/phoned/filters.c index 1341c10..6ee40f4 100644 --- a/phoned/filters.c +++ b/phoned/filters.c @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* $Amigan: phoned/phoned/filters.c,v 1.8 2005/06/12 22:01:23 dcp1990 Exp $ */ +/* $Amigan: phoned/phoned/filters.c,v 1.9 2005/06/12 22:17:44 dcp1990 Exp $ */ #include #include #include @@ -159,6 +159,10 @@ void check_condition(cid) int result = 0; pthread_mutex_lock(&condmx); c = topcond; + if(c == 0x0) { + pthread_mutex_unlock(&condmx); + return; + } while(c != NULL) { if(c->namerx.prex != NULL) rcna = pcre_exec(c->namerx.prex, NULL, cid->name, strlen(cid->name), 0, 0, ovec, 30); diff --git a/phoned/modem.c b/phoned/modem.c index 8da00f1..3d294cf 100644 --- a/phoned/modem.c +++ b/phoned/modem.c @@ -136,6 +136,7 @@ void modem_hread(char* cbuf) rc = parse_cid(buffer); cid_log(rc); cid_notify(rc); + check_condition(rc); free_cid(rc); memset(buffer, 0, sizeof(buffer)); doing_cid = 0;