mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-30 09:03:23 -05:00
Disable session expiration
Auto-logout currently doesn't work as expected and breaks streaming etc once the timeout occurs. Disable it until we can make it work as expected. Maybe we'll need to upgrade the DAAP version.
This commit is contained in:
parent
8cc3d4841f
commit
c70caad87e
@ -574,10 +574,14 @@ daap_session_timeout_cb(int fd, short what, void *arg)
|
|||||||
static struct daap_session *
|
static struct daap_session *
|
||||||
daap_session_register(void)
|
daap_session_register(void)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
|
#endif
|
||||||
struct daap_session *s;
|
struct daap_session *s;
|
||||||
avl_node_t *node;
|
avl_node_t *node;
|
||||||
|
#if 0
|
||||||
int ret;
|
int ret;
|
||||||
|
#endif
|
||||||
|
|
||||||
s = (struct daap_session *)malloc(sizeof(struct daap_session));
|
s = (struct daap_session *)malloc(sizeof(struct daap_session));
|
||||||
if (!s)
|
if (!s)
|
||||||
@ -604,12 +608,14 @@ daap_session_register(void)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
evutil_timerclear(&tv);
|
evutil_timerclear(&tv);
|
||||||
tv.tv_sec = DAAP_SESSION_TIMEOUT;
|
tv.tv_sec = DAAP_SESSION_TIMEOUT;
|
||||||
|
|
||||||
ret = evtimer_add(&s->timeout, &tv);
|
ret = evtimer_add(&s->timeout, &tv);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
DPRINTF(E_LOG, L_DAAP, "Could not add session timeout event for session %d\n", s->id);
|
DPRINTF(E_LOG, L_DAAP, "Could not add session timeout event for session %d\n", s->id);
|
||||||
|
#endif /* 0 */
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
@ -618,7 +624,9 @@ struct daap_session *
|
|||||||
daap_session_find(struct evhttp_request *req, struct evkeyvalq *query, struct evbuffer *evbuf)
|
daap_session_find(struct evhttp_request *req, struct evkeyvalq *query, struct evbuffer *evbuf)
|
||||||
{
|
{
|
||||||
struct daap_session needle;
|
struct daap_session needle;
|
||||||
|
#if 0
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
|
#endif
|
||||||
struct daap_session *s;
|
struct daap_session *s;
|
||||||
avl_node_t *node;
|
avl_node_t *node;
|
||||||
const char *param;
|
const char *param;
|
||||||
@ -644,6 +652,7 @@ daap_session_find(struct evhttp_request *req, struct evkeyvalq *query, struct ev
|
|||||||
|
|
||||||
s = (struct daap_session *)node->item;
|
s = (struct daap_session *)node->item;
|
||||||
|
|
||||||
|
#if 0
|
||||||
event_del(&s->timeout);
|
event_del(&s->timeout);
|
||||||
|
|
||||||
evutil_timerclear(&tv);
|
evutil_timerclear(&tv);
|
||||||
@ -652,6 +661,7 @@ daap_session_find(struct evhttp_request *req, struct evkeyvalq *query, struct ev
|
|||||||
ret = evtimer_add(&s->timeout, &tv);
|
ret = evtimer_add(&s->timeout, &tv);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
DPRINTF(E_LOG, L_DAAP, "Could not add session timeout event for session %d\n", s->id);
|
DPRINTF(E_LOG, L_DAAP, "Could not add session timeout event for session %d\n", s->id);
|
||||||
|
#endif /* 0 */
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
|
|
||||||
@ -1172,7 +1182,7 @@ daap_reply_server_info(struct evhttp_request *req, struct evbuffer *evbuf, char
|
|||||||
passwd = cfg_getstr(lib, "password");
|
passwd = cfg_getstr(lib, "password");
|
||||||
name = cfg_getstr(lib, "name");
|
name = cfg_getstr(lib, "name");
|
||||||
|
|
||||||
len = 157 + strlen(name);
|
len = 136 + strlen(name);
|
||||||
|
|
||||||
ret = evbuffer_expand(evbuf, len);
|
ret = evbuffer_expand(evbuf, len);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
@ -1207,8 +1217,10 @@ daap_reply_server_info(struct evhttp_request *req, struct evbuffer *evbuf, char
|
|||||||
dmap_add_int(evbuf, "apro", apro); /* 12 */
|
dmap_add_int(evbuf, "apro", apro); /* 12 */
|
||||||
dmap_add_string(evbuf, "minm", name); /* 8 + strlen(name) */
|
dmap_add_string(evbuf, "minm", name); /* 8 + strlen(name) */
|
||||||
|
|
||||||
|
#if 0
|
||||||
dmap_add_int(evbuf, "mstm", DAAP_SESSION_TIMEOUT); /* 12 */
|
dmap_add_int(evbuf, "mstm", DAAP_SESSION_TIMEOUT); /* 12 */
|
||||||
dmap_add_char(evbuf, "msal", 1); /* 9 */
|
dmap_add_char(evbuf, "msal", 1); /* 9 */
|
||||||
|
#endif
|
||||||
|
|
||||||
dmap_add_char(evbuf, "mslr", 1); /* 9 */
|
dmap_add_char(evbuf, "mslr", 1); /* 9 */
|
||||||
dmap_add_char(evbuf, "msau", (passwd) ? 2 : 0); /* 9 */
|
dmap_add_char(evbuf, "msau", (passwd) ? 2 : 0); /* 9 */
|
||||||
|
Loading…
Reference in New Issue
Block a user