Merge branch 'master' of ssh://schlaile@git.misdn.org/var/git/lcr
[lcr.git] / route.c
diff --git a/route.c b/route.c
index 13ead05..29381c2 100644 (file)
--- a/route.c
+++ b/route.c
@@ -875,7 +875,7 @@ struct route_ruleset *ruleset_parse(void)
                j<<=1;
        }
 
-        SPRINT(filename[0], "%s/routing.conf", INSTALL_DATA);
+        SPRINT(filename[0], "%s/routing.conf", CONFIG_DATA);
 
         if (!(fp[0]=fopen(filename[0],"r")))
         {
@@ -943,7 +943,7 @@ struct route_ruleset *ruleset_parse(void)
                        if (key[0] == '/')
                                SCPY(filename[nesting+1], key);
                        else
-                               SPRINT(filename[nesting+1], "%s/%s", INSTALL_DATA, key);
+                               SPRINT(filename[nesting+1], "%s/%s", CONFIG_DATA, key);
                        if (!(fp[nesting+1]=fopen(filename[nesting+1],"r")))
                        {
                                PERROR("Cannot open %s\n", filename[nesting+1]);
@@ -1954,7 +1954,7 @@ struct route_action *EndpointAppPBX::route(struct route_ruleset *ruleset)
        struct route_rule       *rule = ruleset->rule_first;
        struct route_cond       *cond;
        struct route_action     *action = NULL;
-       unsigned int            comp_len;
+       unsigned long           comp_len;
        int                     j, jj;
        char                    callerid[64],   redirid[64];
        int                     integer;
@@ -2147,7 +2147,7 @@ struct route_action *EndpointAppPBX::route(struct route_ruleset *ruleset)
                                        if (mISDNport->ifport)
                                        if (strlen(mISDNport->ifport->interface->name) == comp_len)
                                        if (!strncasecmp(mISDNport->ifport->interface->name, cond->string_value, comp_len)) 
-                                       if (!mISDNport->l2hold || mISDNport->l2link)
+                                       if (!mISDNport->l2hold || mISDNport->l2link>0)
                                        {
                                                j = 0;
                                                jj = mISDNport->b_num;
@@ -2179,7 +2179,7 @@ struct route_action *EndpointAppPBX::route(struct route_ruleset *ruleset)
                                {
                                        if (mISDNport->ifport)
                                        if (!strcasecmp(mISDNport->ifport->interface->name, cond->string_value)) 
-                                       if (!mISDNport->l2hold || mISDNport->l2link)
+                                       if (!mISDNport->l2hold || mISDNport->l2link>0)
                                                break;
                                        mISDNport = mISDNport->next;
                                }
@@ -2193,7 +2193,7 @@ struct route_action *EndpointAppPBX::route(struct route_ruleset *ruleset)
                                {
                                        if (mISDNport->ifport)
                                        if (!strcasecmp(mISDNport->ifport->interface->name, cond->string_value)) 
-                                       if (!mISDNport->l2hold || mISDNport->l2link)
+                                       if (!mISDNport->l2hold || mISDNport->l2link>0)
                                                break;
                                        
                                        mISDNport = mISDNport->next;
@@ -2270,7 +2270,7 @@ struct route_action *EndpointAppPBX::route(struct route_ruleset *ruleset)
                                match_string_prefix:
                                comp_len = strlen(cond->string_value); /* because we must reach value's length */
                                /* we must have greater or equal length to values */
-                               if ((unsigned int)strlen(string) < comp_len)
+                               if ((unsigned long)strlen(string) < comp_len)
                                {
                                        /* special case for unfinished dialing */
                                        if (cond->match == MATCH_DIALING)