pipewire: rtsp-client: allow sending arbitrary binary data

Previously, the content had to be a null-terminated byte
sequence because the sending function used `strlen()` to
determine its length. However, `rtsp_do_auth_setup()` needs
to send a non-textual byte sequence, and it only worked so
far because it did not happen to have any zero bytes in it.
Add a "content_length" parameter and change the type of
"content" to facilitate sending arbitrary byte sequences.
This commit is contained in:
Barnabás Pőcze 2022-09-08 15:33:32 +02:00
parent e5ca5d0480
commit 2d7eb8678b
3 changed files with 13 additions and 8 deletions

View file

@ -73,7 +73,7 @@ int pw_rtsp_client_get_local_ip(struct pw_rtsp_client *client,
int pw_rtsp_client_url_send(struct pw_rtsp_client *client, const char *url,
const char *cmd, const struct spa_dict *headers,
const char *content_type, const char *content,
const char *content_type, const void *content, size_t content_length,
void (*reply) (void *user_data, int status, const struct spa_dict *headers),
void *user_data);