Module: kamailio
Branch: master
Commit: fc07aad0beaae9e133ca3252b088afd9eece0c53
URL:
https://github.com/kamailio/kamailio/commit/fc07aad0beaae9e133ca3252b088afd…
Author: Stefan-Cristian Mititelu <stefan-cristian.mititelu(a)1and1.ro>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2024-06-05T21:43:02+02:00
pdbt: Allow to return carrier id 0
---
Modified: utils/pdbt/pdbt.c
---
Diff:
https://github.com/kamailio/kamailio/commit/fc07aad0beaae9e133ca3252b088afd…
Patch:
https://github.com/kamailio/kamailio/commit/fc07aad0beaae9e133ca3252b088afd…
---
diff --git a/utils/pdbt/pdbt.c b/utils/pdbt/pdbt.c
index be670eeb7f8..d9fa0bca45d 100644
--- a/utils/pdbt/pdbt.c
+++ b/utils/pdbt/pdbt.c
@@ -628,15 +628,14 @@ int query_server(char *number, char *comment, void *data) {
carrierid = query_udp(number, sdata->timeout, &(sdata->pfds),
&(sdata->dstaddr), sdata->dstaddrlen);
- if (carrierid<=0) {
+ if(carrierid < 0) {
LINFO("%s: not_found: comment='%s', result=%d\n", number, comment,
carrierid);
if (carrierid < 0) {
result = carrierid;
} else {
result = PDB_NOT_IN_PDB;
}
- }
- else {
+ } else {
LINFO("%s:%ld:%s\n", number, (long int)carrierid,
carrierid2name(carrierid));
result = PDB_OK;
}