From fb43099dce2e0f62bb663a5f4a316510dc5dc4c7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 26 Nov 2014 00:47:58 +0100 Subject: [PATCH] Fix up more conflicts. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/lib/raop.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/lib/raop.c b/src/lib/raop.c index e59254a..0c640b5 100644 --- a/src/lib/raop.c +++ b/src/lib/raop.c @@ -123,10 +123,7 @@ conn_init(void *opaque, unsigned char *local, int locallen, unsigned char *remot static void conn_request(void *ptr, http_request_t *request, http_response_t **response) { -<<<<<<< HEAD -======= const char realm[] = "airplay"; ->>>>>>> 64d59e3087f829006d091fa0d114efb50972a2bf raop_conn_t *conn = ptr; raop_t *raop = conn->raop; @@ -143,13 +140,9 @@ conn_request(void *ptr, http_request_t *request, http_response_t **response) } res = http_response_init("RTSP/1.0", 200, "OK"); -<<<<<<< HEAD - if (strlen(raop->password)) { -======= /* We need authorization for everything else than OPTIONS request */ if (strcmp(method, "OPTIONS") != 0 && strlen(raop->password)) { ->>>>>>> 64d59e3087f829006d091fa0d114efb50972a2bf const char *authorization; authorization = http_request_get_header(request, "Authorization"); @@ -157,31 +150,19 @@ conn_request(void *ptr, http_request_t *request, http_response_t **response) logger_log(conn->raop->logger, LOGGER_DEBUG, "Our nonce: %s", conn->nonce); logger_log(conn->raop->logger, LOGGER_DEBUG, "Authorization: %s", authorization); } -<<<<<<< HEAD - if (!digest_is_valid("AppleTV", raop->password, conn->nonce, method, http_request_get_url(request), authorization)) { -======= if (!digest_is_valid(realm, raop->password, conn->nonce, method, http_request_get_url(request), authorization)) { ->>>>>>> 64d59e3087f829006d091fa0d114efb50972a2bf char *authstr; int authstrlen; /* Allocate the authenticate string */ -<<<<<<< HEAD - authstrlen = sizeof("Digest realm=\"AppleTV\", nonce=\"\"") + sizeof(conn->nonce) + 1; -======= authstrlen = sizeof("Digest realm=\"\", nonce=\"\"") + sizeof(realm) + sizeof(conn->nonce) + 1; ->>>>>>> 64d59e3087f829006d091fa0d114efb50972a2bf authstr = malloc(authstrlen); /* Concatenate the authenticate string */ memset(authstr, 0, authstrlen); -<<<<<<< HEAD - strcat(authstr, "Digest realm=\"AppleTV\", nonce=\""); -======= strcat(authstr, "Digest realm=\""); strcat(authstr, realm); strcat(authstr, "\", nonce=\""); ->>>>>>> 64d59e3087f829006d091fa0d114efb50972a2bf strcat(authstr, conn->nonce); strcat(authstr, "\""); -- 2.34.1