mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-17 02:42:33 +00:00
list default port and socket in daemon
This commit is contained in:
parent
87a0f31a89
commit
c51407e08f
13
src/daemon.c
13
src/daemon.c
@ -1077,9 +1077,10 @@ static int clients_require_discoverable(void){
|
|||||||
|
|
||||||
static void usage(const char * name) {
|
static void usage(const char * name) {
|
||||||
printf("%s, BTstack background daemon\n", name);
|
printf("%s, BTstack background daemon\n", name);
|
||||||
printf("usage: %s [-h|--help] [--tcp port]\n", name);
|
printf("usage: %s [--help] [--tcp port]\n", name);
|
||||||
printf(" -h|--help display this usage\n");
|
printf(" --help display this usage\n");
|
||||||
printf(" --tcp port use TCP server socket instead of local unix socket\n");
|
printf(" --tcp use TCP server on port %u\n", BTSTACK_PORT);
|
||||||
|
printf("Without the --tcp option, BTstack daemon is listening on unix domain socket %s\n\n", BTSTACK_UNIX);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USE_BLUETOOL
|
#ifdef USE_BLUETOOL
|
||||||
@ -1218,6 +1219,12 @@ int main (int argc, char * const * argv){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tcp_flag){
|
||||||
|
printf("BTstack Daemon started on port %u\n", BTSTACK_PORT);
|
||||||
|
} else {
|
||||||
|
printf("BTstack Daemon started on socket %s\n", BTSTACK_UNIX);
|
||||||
|
}
|
||||||
|
|
||||||
// make stdout unbuffered
|
// make stdout unbuffered
|
||||||
setbuf(stdout, NULL);
|
setbuf(stdout, NULL);
|
||||||
log_error("BTdaemon started\n");
|
log_error("BTdaemon started\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user