mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-15 08:45:54 -04:00
[daap/dacp] Remove bufferevent workaround, maybe not required any more TEST
This commit is contained in:
parent
41b11c6270
commit
85dd6092f6
@ -42,7 +42,6 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <event2/event.h>
|
#include <event2/event.h>
|
||||||
#include <event2/bufferevent.h>
|
|
||||||
|
|
||||||
#include "httpd_daap.h"
|
#include "httpd_daap.h"
|
||||||
#include "logger.h"
|
#include "logger.h"
|
||||||
@ -993,7 +992,6 @@ daap_reply_update(struct httpd_request *hreq)
|
|||||||
{
|
{
|
||||||
struct daap_update_request *ur;
|
struct daap_update_request *ur;
|
||||||
struct evhttp_connection *evcon;
|
struct evhttp_connection *evcon;
|
||||||
struct bufferevent *bufev;
|
|
||||||
const char *param;
|
const char *param;
|
||||||
int reqd_rev;
|
int reqd_rev;
|
||||||
int ret;
|
int ret;
|
||||||
@ -1073,18 +1071,7 @@ daap_reply_update(struct httpd_request *hreq)
|
|||||||
*/
|
*/
|
||||||
evcon = evhttp_request_get_connection(hreq->req);
|
evcon = evhttp_request_get_connection(hreq->req);
|
||||||
if (evcon)
|
if (evcon)
|
||||||
{
|
evhttp_connection_set_closecb(evcon, update_fail_cb, ur);
|
||||||
evhttp_connection_set_closecb(evcon, update_fail_cb, ur);
|
|
||||||
|
|
||||||
// This is a workaround for some versions of libevent (2.0, but possibly
|
|
||||||
// also 2.1) that don't detect if the client hangs up, and thus don't
|
|
||||||
// clean up and never call update_fail_cb(). See github issue #870 and
|
|
||||||
// https://github.com/libevent/libevent/issues/666. It should probably be
|
|
||||||
// removed again in the future. The workaround is also present in dacp.c
|
|
||||||
bufev = evhttp_connection_get_bufferevent(evcon);
|
|
||||||
if (bufev)
|
|
||||||
bufferevent_enable(bufev, EV_READ);
|
|
||||||
}
|
|
||||||
|
|
||||||
return DAAP_REPLY_NONE;
|
return DAAP_REPLY_NONE;
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <event2/event.h>
|
#include <event2/event.h>
|
||||||
#include <event2/bufferevent.h>
|
|
||||||
|
|
||||||
#include "httpd_dacp.h"
|
#include "httpd_dacp.h"
|
||||||
#include "httpd_daap.h"
|
#include "httpd_daap.h"
|
||||||
@ -2236,7 +2235,6 @@ dacp_reply_playstatusupdate(struct httpd_request *hreq)
|
|||||||
{
|
{
|
||||||
struct dacp_update_request *ur;
|
struct dacp_update_request *ur;
|
||||||
struct evhttp_connection *evcon;
|
struct evhttp_connection *evcon;
|
||||||
struct bufferevent *bufev;
|
|
||||||
const char *param;
|
const char *param;
|
||||||
int reqd_rev;
|
int reqd_rev;
|
||||||
int ret;
|
int ret;
|
||||||
@ -2297,18 +2295,7 @@ dacp_reply_playstatusupdate(struct httpd_request *hreq)
|
|||||||
*/
|
*/
|
||||||
evcon = evhttp_request_get_connection(hreq->req);
|
evcon = evhttp_request_get_connection(hreq->req);
|
||||||
if (evcon)
|
if (evcon)
|
||||||
{
|
evhttp_connection_set_closecb(evcon, update_fail_cb, ur);
|
||||||
evhttp_connection_set_closecb(evcon, update_fail_cb, ur);
|
|
||||||
|
|
||||||
// This is a workaround for some versions of libevent (2.0, but possibly
|
|
||||||
// also 2.1) that don't detect if the client hangs up, and thus don't
|
|
||||||
// clean up and never call update_fail_cb(). See github issue #870 and
|
|
||||||
// https://github.com/libevent/libevent/issues/666. It should probably be
|
|
||||||
// removed again in the future. The workaround is also present in daap.c
|
|
||||||
bufev = evhttp_connection_get_bufferevent(evcon);
|
|
||||||
if (bufev)
|
|
||||||
bufferevent_enable(bufev, EV_READ);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user