FreeCalypso > hg > osmo-playpen
diff smsc-daemon/main.c @ 14:d9db8661d9f3
smsc-daemon: add local socket for sendmt
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Sun, 27 Aug 2023 17:15:30 -0800 |
| parents | 22ddb71f6883 |
| children | 9ff041d85da5 |
line wrap: on
line diff
--- a/smsc-daemon/main.c Sun Aug 27 16:36:59 2023 -0800 +++ b/smsc-daemon/main.c Sun Aug 27 17:15:30 2023 -0800 @@ -12,6 +12,7 @@ #include <ctype.h> #include <string.h> #include <stdio.h> +#include <stdint.h> #include <stdlib.h> #include <errno.h> #include <signal.h> @@ -30,6 +31,7 @@ #include "logging.h" extern int gsupc_read_cb(struct osmo_gsup_client *gsupc, struct msgb *msg); +extern void setup_local_socket(const char *pathname); #define MAX_IPA_NAME 31 @@ -83,8 +85,9 @@ osmo_init_logging2(ctx, &smsc_log_info); - if (argc != 3) { - fprintf(stderr, "usage: %s ipa-name logfile\n", argv[0]); + if (argc < 3 || argc > 4) { + fprintf(stderr, "usage: %s ipa-name logfile [local-socket]\n", + argv[0]); exit(1); } set_ipa_name(argv[1]); @@ -97,6 +100,8 @@ fprintf(stderr, "error: osmo_gsup_client_create2() failed\n"); exit(1); } + if (argv[3]) + setup_local_socket(argv[3]); while (1) { osmo_select_main(0);
