mirror of
https://github.com/owntone/owntone-server.git
synced 2025-05-22 01:54:00 -04:00
fix inverted error message
This commit is contained in:
parent
5d813e8b13
commit
ae0538d347
@ -184,6 +184,8 @@ void daap_handler(WS_CONNINFO *pwsc) {
|
|||||||
off_t real_len;
|
off_t real_len;
|
||||||
off_t file_len;
|
off_t file_len;
|
||||||
|
|
||||||
|
int bytes_copied=0;
|
||||||
|
|
||||||
close=pwsc->close;
|
close=pwsc->close;
|
||||||
pwsc->close=1; /* in case we have any errors */
|
pwsc->close=1; /* in case we have any errors */
|
||||||
root=NULL;
|
root=NULL;
|
||||||
@ -434,10 +436,14 @@ void daap_handler(WS_CONNINFO *pwsc) {
|
|||||||
lseek(file_fd,offset,SEEK_SET);
|
lseek(file_fd,offset,SEEK_SET);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(copyfile(file_fd,pwsc->fd)) {
|
if((bytes_copied=copyfile(file_fd,pwsc->fd)) == -1) {
|
||||||
DPRINTF(E_INF,L_WS,"Error copying file to remote... %s\n",
|
DPRINTF(E_INF,L_WS,"Error copying file to remote... %s\n",
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
|
} else {
|
||||||
|
DPRINTF(E_INF,L_WS,"Finished streaming file to remote: %d bytes\n",
|
||||||
|
bytes_copied);
|
||||||
}
|
}
|
||||||
|
|
||||||
config_set_status(pwsc,session_id,NULL);
|
config_set_status(pwsc,session_id,NULL);
|
||||||
r_close(file_fd);
|
r_close(file_fd);
|
||||||
db_dispose(pmp3);
|
db_dispose(pmp3);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user