(cherry picked from commit 88b698e0f62c39ed60af9f0a4fb3ca2dc6867d8f)
@@ -151,7 +151,7 @@ int udp_server(int so)
carrierid = lookup_number(msg.bdy.payload);
/* check if not found pdb_id */
- if(carrierid == 0) {
+ if(carrierid == -1) {
pdb_msg_format_send(&msg, PDB_VERSION_1, PDB_TYPE_REPLY_ID,
PDB_CODE_NOT_FOUND, htons(msg.hdr.id), NULL, 0);
goto msg_send;
@@ -44,8 +44,8 @@ carrier_t lookup_number(char *number)
carrier_t carrierid;
int nmatch = dtm_longest_match(mroot, number, strlen(number), &carrierid);
if(nmatch <= 0) {
- /* nothing found - return id 0 */
- carrierid = 0;
+ /* nothing found - return id -1 */
+ carrierid = -1;
}
LINFO("request='%s', nmatch=%ld, carrier=%ld\n", number, (long int)nmatch,
(long int)carrierid);