mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-13 06:57:07 +03:00
fix flush mode
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -227,7 +227,7 @@ int main(int argc, char *argv[]) {
|
||||
} else if (!strcasecmp(arg, "-i")) {
|
||||
identity = *++argv;
|
||||
} else {
|
||||
// nothing let's try to be smart and handle legacy crappy
|
||||
// nothing let's try to be smart and handle legacy crap
|
||||
if (!identity) identity = *argv;
|
||||
else if (!type) (void) !asprintf(&type, "%s.local", *argv);
|
||||
else if (!port) port = atoi(*argv);
|
||||
@@ -235,6 +235,7 @@ int main(int argc, char *argv[]) {
|
||||
txt = (const char**) malloc((argc + 1) * sizeof(char**));
|
||||
memcpy(txt, argv, argc * sizeof(char**));
|
||||
txt[argc] = NULL;
|
||||
break;
|
||||
}
|
||||
argc--;
|
||||
}
|
||||
@@ -250,13 +251,14 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
mdnsd_set_hostname(svr, hostname, host);
|
||||
svc = mdnsd_register_svc(svr, identity, type, port, NULL, txt);
|
||||
mdns_service_destroy(svc);
|
||||
// mdns_service_destroy(svc);
|
||||
|
||||
#ifdef _WIN32
|
||||
Sleep(INFINITE);
|
||||
#else
|
||||
pause();
|
||||
#endif
|
||||
mdns_service_remove(svr, svc);
|
||||
mdnsd_stop(svr);
|
||||
} else {
|
||||
printf("Can't start server");
|
||||
@@ -264,7 +266,7 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
|
||||
free(type);
|
||||
free(txt);
|
||||
if (txt) free(txt);
|
||||
|
||||
#ifdef _WIN32
|
||||
winsock_close();
|
||||
|
||||
@@ -144,11 +144,10 @@ static int create_recv_sock(uint32_t host) {
|
||||
}
|
||||
|
||||
#if !defined(_WIN32)
|
||||
on = sizeof(on);
|
||||
socklen_t len;
|
||||
if (!getsockopt(sd, SOL_SOCKET, SO_REUSEPORT,(char*) &on, &len)) {
|
||||
socklen_t len = sizeof(on);
|
||||
if (!getsockopt(sd, SOL_SOCKET, SO_REUSEPORT, &on, &len)) {
|
||||
on = 1;
|
||||
if ((r = setsockopt(sd, SOL_SOCKET, SO_REUSEPORT,(char*) &on, sizeof(on))) < 0) {
|
||||
if ((r = setsockopt(sd, SOL_SOCKET, SO_REUSEPORT, &on, sizeof(on))) < 0) {
|
||||
log_message(LOG_ERR, "recv setsockopt(SO_REUSEPORT): %m\n", r);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user