1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-06-23 06:25:24 +00:00

Fix: Corrects setup of client_t in client mode.

Closes: #2336
This commit is contained in:
Philipp Schafft 2018-07-20 11:25:55 +00:00
parent c40d12a1c7
commit 75314c2b34
2 changed files with 9 additions and 0 deletions

View File

@ -144,6 +144,14 @@ void client_complete(client_t *client)
}
}
if (!have) {
if (client->parser->req_type == httpp_req_none) {
/* We are a client. If the server did not tell us, we asume streaming. */
client->request_body_length = -1; /* streaming */
have = 1;
}
}
ICECAST_LOG_DEBUG("Client %p has request_body_length=%zi", client, client->request_body_length);
}

View File

@ -285,6 +285,7 @@ static client_t *open_relay_connection (relay_server *relay)
global_unlock ();
sock_set_blocking (streamsock, 0);
client_set_queue (client, NULL);
client_complete(client);
free (server);
free (mount);
free (server_id);