More fixes for iTunes 4.5
This commit is contained in:
parent
3d2c60572d
commit
3978d0932c
|
@ -417,6 +417,7 @@ DAAP_BLOCK *daap_response_update(int fd, int clientver) {
|
|||
if(FD_ISSET(fd,&rset)) {
|
||||
/* can't be ready for read, must be error */
|
||||
DPRINTF(ERR_DEBUG,"Socket closed?\n");
|
||||
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -350,6 +350,8 @@ int db_end_initial_update(void) {
|
|||
|
||||
rbdestroy(db_removed);
|
||||
|
||||
db_version_no++;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -144,6 +144,9 @@ void daap_handler(WS_CONNINFO *pwsc) {
|
|||
root=daap_response_update(pwsc->fd,clientrev);
|
||||
if((!ws_getvar(pwsc,"delta")) && (root==NULL)) {
|
||||
DPRINTF(ERR_LOG,"Client %s disconnected\n",pwsc->hostname);
|
||||
config_set_status(pwsc,session_id,NULL);
|
||||
pwsc->close=1;
|
||||
return;
|
||||
}
|
||||
} else if (!strcasecmp(pwsc->uri,"/logout")) {
|
||||
config_set_status(pwsc,session_id,NULL);
|
||||
|
@ -297,7 +300,7 @@ void daap_handler(WS_CONNINFO *pwsc) {
|
|||
da_attach_image(img_fd, pwsc->fd, file_fd, offset);
|
||||
} else if(offset) {
|
||||
DPRINTF(ERR_INFO,"Seeking to offset %d\n",offset);
|
||||
lseek(file_fd,(fpos_t)offset,SEEK_SET);
|
||||
lseek(file_fd,offset,SEEK_SET);
|
||||
}
|
||||
|
||||
if(copyfile(file_fd,pwsc->fd)) {
|
||||
|
@ -654,6 +657,10 @@ int main(int argc, char *argv[]) {
|
|||
if(config.reload) {
|
||||
config.reload=0;
|
||||
DPRINTF(ERR_LOG,"Reloading configuration\n");
|
||||
if(scan_init(config.mp3dir)) {
|
||||
DPRINTF(ERR_LOG,"Error rescanning... exiting\n");
|
||||
config.stop=1;
|
||||
}
|
||||
}
|
||||
sleep(2);
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <pwd.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <rendezvous/rendezvous.h>
|
||||
|
@ -73,6 +74,7 @@ int rend_private_init(char *user) {
|
|||
sw_result result;
|
||||
|
||||
DPRINTF(ERR_DEBUG,"Starting rendezvous services\n");
|
||||
signal(SIGHUP, SIG_IGN); // SIGHUP might happen from a request to reload the daap server
|
||||
|
||||
if(sw_rendezvous_init(&rend_handle) != SW_OKAY) {
|
||||
DPRINTF(ERR_WARN,"Error initializing rendezvous\n");
|
||||
|
|
Loading…
Reference in New Issue