Add debugging
This commit is contained in:
parent
abf326c69e
commit
a01e46d961
19
src/daap.c
19
src/daap.c
|
@ -153,6 +153,8 @@ DAAP_BLOCK *daap_response_content_codes(void) {
|
|||
DAAP_ITEMS *current=taglist;
|
||||
int g=1;
|
||||
|
||||
DPRINTF(ERR_DEBUG,"Preparing to get content codes\n");
|
||||
|
||||
root=daap_add_empty(NULL,"mccr");
|
||||
if(root) {
|
||||
g = (int)daap_add_int(root,"mstt",200);
|
||||
|
@ -183,6 +185,7 @@ DAAP_BLOCK *daap_response_login(void) {
|
|||
DAAP_BLOCK *root;
|
||||
int g=1;
|
||||
|
||||
DPRINTF(ERR_DEBUG,"Preparing to send login response\n");
|
||||
|
||||
root=daap_add_empty(NULL,"mlog");
|
||||
if(root) {
|
||||
|
@ -212,9 +215,13 @@ DAAP_BLOCK *daap_response_songlist(void) {
|
|||
ENUMHANDLE henum;
|
||||
MP3FILE *current;
|
||||
|
||||
DPRINTF(ERR_DEBUG,"Preparing to send db items\n");
|
||||
|
||||
henum=db_enum_begin();
|
||||
if(!henum)
|
||||
if(!henum) {
|
||||
DPRINTF(ERR_DEBUG,"Can't get enum handle\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
root=daap_add_empty(NULL,"adbs");
|
||||
if(root) {
|
||||
|
@ -312,6 +319,8 @@ DAAP_BLOCK *daap_response_update(int clientver) {
|
|||
DAAP_BLOCK *root;
|
||||
int g=1;
|
||||
|
||||
DPRINTF(ERR_DEBUG,"Preparing to send update response\n");
|
||||
|
||||
while(clientver == db_version()) {
|
||||
sleep(30);
|
||||
}
|
||||
|
@ -343,6 +352,8 @@ DAAP_BLOCK *daap_response_playlists(void) {
|
|||
DAAP_BLOCK *mlit;
|
||||
int g=1;
|
||||
|
||||
DPRINTF(ERR_DEBUG,"Preparing to send playlists\n");
|
||||
|
||||
root=daap_add_empty(NULL,"aply");
|
||||
if(root) {
|
||||
g = (int)daap_add_int(root,"mstt",200);
|
||||
|
@ -384,6 +395,8 @@ DAAP_BLOCK *daap_response_dbinfo(void) {
|
|||
DAAP_BLOCK *mlit;
|
||||
int g=1;
|
||||
|
||||
DPRINTF(ERR_DEBUG,"Preparing to send db info\n");
|
||||
|
||||
root=daap_add_empty(NULL,"avdb");
|
||||
if(root) {
|
||||
g = (int)daap_add_int(root,"mstt",200);
|
||||
|
@ -423,6 +436,8 @@ DAAP_BLOCK *daap_response_server_info(void) {
|
|||
DAAP_BLOCK *root;
|
||||
int g=1;
|
||||
|
||||
DPRINTF(ERR_DEBUG,"Preparing to send server info\n");
|
||||
|
||||
root=daap_add_empty(NULL,"msrv");
|
||||
|
||||
if(root) {
|
||||
|
@ -465,6 +480,8 @@ DAAP_BLOCK *daap_response_playlist_items(int playlist) {
|
|||
MP3FILE *current;
|
||||
int g=1;
|
||||
|
||||
DPRINTF(ERR_DEBUG,"Preparing to send playlist items for pl #%d\n",playlist);
|
||||
|
||||
henum=db_enum_begin();
|
||||
if(!henum)
|
||||
return NULL;
|
||||
|
|
|
@ -178,6 +178,7 @@ void daap_handler(WS_CONNINFO *pwsc) {
|
|||
}
|
||||
|
||||
if((!root)&&(!streaming)) {
|
||||
DPRINTF(ERR_DEBUG,"Bad request -- root=%x, streaming=%d\n",root,streaming);
|
||||
ws_returnerror(pwsc,400,"Invalid Request");
|
||||
config_set_status(pwsc,session_id,NULL);
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue