data = http_request_get_data(request, &datalen);
if (data) {
sdp_t *sdp;
- const char *remotestr, *fmtpstr, *aeskeystr, *aesivstr;
+ const char *remotestr, *rtpmapstr, *fmtpstr, *aeskeystr, *aesivstr;
sdp = sdp_init(data, datalen);
remotestr = sdp_get_connection(sdp);
+ rtpmapstr = sdp_get_rtpmap(sdp);
fmtpstr = sdp_get_fmtp(sdp);
aeskeystr = sdp_get_rsaaeskey(sdp);
aesivstr = sdp_get_aesiv(sdp);
logger_log(conn->raop->logger, LOGGER_DEBUG, "connection: %s", remotestr);
+ logger_log(conn->raop->logger, LOGGER_DEBUG, "rtpmap: %s", rtpmapstr);
logger_log(conn->raop->logger, LOGGER_DEBUG, "fmtp: %s", fmtpstr);
logger_log(conn->raop->logger, LOGGER_DEBUG, "rsaaeskey: %s", aeskeystr);
logger_log(conn->raop->logger, LOGGER_DEBUG, "aesiv: %s", aesivstr);
raop_rtp_destroy(conn->raop_rtp);
conn->raop_rtp = NULL;
}
- conn->raop_rtp = raop_rtp_init(raop->logger, &raop->callbacks, remotestr, fmtpstr, aeskey, aesiv);
+ conn->raop_rtp = raop_rtp_init(raop->logger, &raop->callbacks, remotestr, rtpmapstr, fmtpstr, aeskey, aesiv);
sdp_destroy(sdp);
}
} else if (!strcmp(method, "SETUP")) {
}
raop_t *
-raop_init(int max_clients, raop_callbacks_t *callbacks, const char *pemkey)
+raop_init(int max_clients, raop_callbacks_t *callbacks, const char *pemkey, int *error)
{
raop_t *raop;
httpd_t *httpd;
httpd_cbs.conn_destroy = &conn_destroy;
/* Initialize the http daemon */
- httpd = httpd_init(raop->logger, &httpd_cbs, max_clients, 1);
+ httpd = httpd_init(raop->logger, &httpd_cbs, max_clients);
if (!httpd) {
free(raop);
return NULL;
}
raop_t *
-raop_init_from_keyfile(int max_clients, raop_callbacks_t *callbacks, const char *keyfile)
+raop_init_from_keyfile(int max_clients, raop_callbacks_t *callbacks, const char *keyfile, int *error)
{
raop_t *raop;
char *pemstr;
if (utils_read_file(&pemstr, keyfile) < 0) {
return NULL;
}
- raop = raop_init(max_clients, callbacks, pemstr);
+ raop = raop_init(max_clients, callbacks, pemstr, error);
free(pemstr);
return raop;
}