Skip to content

Commit b579acb

Browse files
Sda79Sylvain Daste
authored and
Sylvain Daste
committed
OpenSIPS#1923 - New option flag
1 parent 3cdc8f1 commit b579acb

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

help_msg.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ Options:\n\
108108
shall receive input via stdin and it must output the\n\
109109
result to stdout\n\
110110
-P file Create a pid file\n\
111-
-G file Create a pgid file\n"
111+
-G file Create a pgid file\n\
112+
-A address Set the globally advertised addres\n"
112113
#ifdef UNIT_TESTS
113114
" -T Fork, run unit tests and exit.\n"
114115
#endif

main.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ int main(int argc, char** argv)
408408
/* process pkg mem size from command line */
409409
opterr=0;
410410

411-
options="f:cCm:M:b:l:n:N:rRvdDFEVhw:t:u:g:p:P:G:W:o:a:k:s:"
411+
options="A:f:cCm:M:b:l:n:N:rRvdDFEVhw:t:u:g:p:P:G:W:o:a:k:s:"
412412
#ifdef UNIT_TESTS
413413
"T:"
414414
#endif
@@ -620,6 +620,10 @@ int main(int argc, char** argv)
620620
if (add_arg_var(optarg) < 0)
621621
LM_ERR("cannot add option %s\n", optarg);
622622
break;
623+
case 'A':
624+
default_global_address->s = optarg;
625+
default_global_address->len = strlen(optarg);
626+
break;
623627
#ifdef UNIT_TESTS
624628
case 'T':
625629
LM_INFO("running in testing framework mode, for '%s'\n", optarg);

0 commit comments

Comments
 (0)