Do not use a scoped address in SDP payload

This commit is contained in:
Julien BLACHE 2010-10-02 12:41:45 +02:00
parent 309ad6060e
commit 65a75dd85f

View File

@ -981,13 +981,21 @@ raop_make_sdp(struct raop_session *rs, struct evrtsp_request *req, char *address
"a=rsaaeskey:%s\r\n" \
"a=aesiv:%s\r\n"
char *p;
int ret;
p = strchr(rs->address, '%');
if (p)
*p = '\0';
/* Add SDP payload */
ret = evbuffer_add_printf(req->output_buffer, SDP_PLD_FMT,
session_id, address, rs->address, AIRTUNES_V2_PACKET_SAMPLES,
raop_aes_key_b64, raop_aes_iv_b64);
if (p)
*p = '%';
if (ret < 0)
{
DPRINTF(E_LOG, L_RAOP, "Out of memory for SDP payload\n");