# HG changeset patch # User Mychaela Falconia # Date 1717890906 0 # Node ID 847690ea7f4ad0d4588c200b02c65943079f4fbe # Parent 053f0468710646631c9255a2ccf02cda1fbb3d16 mncc compiles in new environment diff -r 053f04687106 -r 847690ea7f4a .hgignore --- a/.hgignore Sat Jun 08 23:12:12 2024 +0000 +++ b/.hgignore Sat Jun 08 23:55:06 2024 +0000 @@ -2,3 +2,5 @@ \.[oa]$ ^config\.defs$ + +^mncc/themwi-mncc$ diff -r 053f04687106 -r 847690ea7f4a mncc/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mncc/Makefile Sat Jun 08 23:55:06 2024 +0000 @@ -0,0 +1,19 @@ +CPPFLAGS=-I${includedir} +PROG= themwi-mncc +OBJS= call_setup.o extsock.o gsm_call.o intswitch.o main.o mncc_recv.o \ + mncc_sock.o mtsock.o outcall.o +LIBUTIL=../libutil/libutil.a + +include ../config.defs + +all: ${PROG} + +${PROG}: ${OBJS} ${LIBUTIL} + ${CC} -o $@ ${OBJS} ${LIBUTIL} -L${libdir} -lnumdb -lnumutil + +install: + mkdir -p ${DESTDIR}${bindir} + install -c -m 755 ${PROG} ${DESTDIR}${bindir} + +clean: + rm -f *.o ${PROG} errs diff -r 053f04687106 -r 847690ea7f4a mncc/call_setup.c --- a/mncc/call_setup.c Sat Jun 08 23:12:12 2024 +0000 +++ b/mncc/call_setup.c Sat Jun 08 23:55:06 2024 +0000 @@ -7,14 +7,18 @@ #include #include #include +#include #include #include #include #include + +#include +#include +#include + #include "../include/mncc.h" #include "../include/gsm48_const.h" -#include "../include/number_db_v2.h" -#include "../libnumdb2/lookup_func.h" #include "struct.h" #include "gsm_call.h" @@ -23,7 +27,7 @@ { int len; - len = grok_number_string(nums->number, 0); + len = grok_number_string(nums->number, false); switch (len) { case 4: nums->type = GSM48_TON_NET_SPEC; @@ -60,8 +64,8 @@ struct gsm_mncc *msg; { struct gsm_call *call; - struct owned_number_rec *own; - struct short_number_rec *snum; + const struct owned_number_rec *own; + const struct short_number_rec *snum; int is_nanp, is_itn, is_local; if (preen_msc_provided_number(&msg->calling)) @@ -86,7 +90,7 @@ /* route based on destination address */ refresh_number_db(); is_nanp = is_itn = 0; - switch (grok_number_string(msg->called.number, 0)) { + switch (grok_number_string(msg->called.number, false)) { case 4: if (msg->called.type != GSM48_TON_UNKNOWN && msg->called.type != GSM48_TON_NET_SPEC && diff -r 053f04687106 -r 847690ea7f4a mncc/main.c --- a/mncc/main.c Sat Jun 08 23:12:12 2024 +0000 +++ b/mncc/main.c Sat Jun 08 23:55:06 2024 +0000 @@ -12,6 +12,7 @@ #include #include #include +#include #include "struct.h" extern int mncc_socket;