[MOD] Listen to localhost by default

This commit is contained in:
LDA 2024-07-28 15:21:38 +02:00
commit 8edd929c45

View file

@ -1,5 +1,12 @@
/* config.c - Generates a nice Parsee config file /* config.c - Generates a nice Parsee config file
* ============================================================ * ============================================================
* Example of usage(for a blow.hole HS and a xmpp.blow.hole JCP):
* tools/out/config \
* -d '/var/lib/parsee' \
* -m 'https://pmedia.blow.hole' \
* -H 'blow.hole' \
* -s 'The Dark Blowhole shared secret' \
* -J 'xmpp.blow.hole'
* Under CC0, as its a rather useful example of a Parsee tool. * Under CC0, as its a rather useful example of a Parsee tool.
* See LICENSE for more information about Parsee's licensing. */ * See LICENSE for more information about Parsee's licensing. */
@ -82,6 +89,8 @@ Main(Array *args, HashMap *env)
int flag, code = EXIT_FAILURE; int flag, code = EXIT_FAILURE;
int port = 5347; int port = 5347;
listen = "localhost";
ArgParseStateInit(&state); ArgParseStateInit(&state);
while ((flag = ArgParse(&state, args, "H:J:s:d:p:m:l:")) != -1) while ((flag = ArgParse(&state, args, "H:J:s:d:p:m:l:")) != -1)
{ {
@ -94,7 +103,7 @@ Main(Array *args, HashMap *env)
jcp = state.optArg; jcp = state.optArg;
break; break;
case 'm': case 'm':
Free(listen); Free(media);
media = StrDuplicate(state.optArg); media = StrDuplicate(state.optArg);
break; break;
case 'J': case 'J':