X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=route.c;h=29381c2d2a339f93d4cb2bdba38f494024c5277a;hp=093ccbe041a913795790a2e10e4227242d5324c3;hb=ee848d3a9e333b3b91c0e40679c9d0512d511fc2;hpb=026b04fc75011a144285f399b82890803b4315bd diff --git a/route.c b/route.c index 093ccbe..29381c2 100644 --- a/route.c +++ b/route.c @@ -90,7 +90,7 @@ struct cond_defs cond_defs[] = { "notbusy=[,...]","Matches if any of the given extension is not busy."}, { "remote", MATCH_REMOTE, COND_TYPE_STRING, "remote=","Matches if remote application is running."}, - { "notremote", MATCH_NOTREMOTE,COND_TYPE_NULL, + { "notremote", MATCH_NOTREMOTE,COND_TYPE_STRING, "notremote=","Matches if remote application is not running."}, { NULL, 0, 0, NULL} }; @@ -751,7 +751,7 @@ void ruleset_debug(struct route_ruleset *ruleset_start) /* * parse ruleset */ -static char *read_string(char *p, char *key, int key_size, char *special) +static char *read_string(char *p, char *key, int key_size, const char *special) { key[0] = 0; @@ -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]); @@ -1922,7 +1922,7 @@ struct route_ruleset *ruleset_parse(void) /* * return ruleset by name */ -struct route_ruleset *getrulesetbyname(char *name) +struct route_ruleset *getrulesetbyname(const char *name) { struct route_ruleset *ruleset = ruleset_first; @@ -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;