fix some more trivial problems

This commit is contained in:
Ron Pedde 2005-11-16 05:03:17 +00:00
parent 51274d7b03
commit 5733445333
3 changed files with 11 additions and 8 deletions

View File

@ -825,6 +825,11 @@ int db_sqlite_enum_start(DBQUERYINFO *pinfo) {
db_sqlite_unlock(); db_sqlite_unlock();
return -1; return -1;
} }
if(!rows) {
DPRINTF(E_LOG,L_DB|L_DAAP,"Could not find playlist %d\n",pinfo->playlist_id);
return -1;
}
is_smart=(atoi(resarray[2]) == 1); is_smart=(atoi(resarray[2]) == 1);
have_clause=1; have_clause=1;
if(is_smart) { if(is_smart) {

View File

@ -65,7 +65,6 @@ typedef struct tag_ws_handler {
typedef struct tag_ws_connlist { typedef struct tag_ws_connlist {
WS_CONNINFO *pwsc; WS_CONNINFO *pwsc;
char *status;
struct tag_ws_connlist *next; struct tag_ws_connlist *next;
} WS_CONNLIST; } WS_CONNLIST;
@ -293,8 +292,6 @@ void ws_remove_dispatch_thread(WS_PRIVATE *pwsp, WS_CONNINFO *pwsc) {
pTail->next = pHead->next; pTail->next = pHead->next;
if(pHead->status)
free(pHead->status);
free(pHead); free(pHead);
/* signal condition in case something is waiting */ /* signal condition in case something is waiting */
@ -319,7 +316,6 @@ void ws_add_dispatch_thread(WS_PRIVATE *pwsp, WS_CONNINFO *pwsc) {
pNew=(WS_CONNLIST*)malloc(sizeof(WS_CONNLIST)); pNew=(WS_CONNLIST*)malloc(sizeof(WS_CONNLIST));
pNew->next=NULL; pNew->next=NULL;
pNew->pwsc=pwsc; pNew->pwsc=pwsc;
pNew->status=strdup("Initializing");
if(!pNew) if(!pNew)
DPRINTF(E_FATAL,L_WS,"Malloc: %s\n",strerror(errno)); DPRINTF(E_FATAL,L_WS,"Malloc: %s\n",strerror(errno));
@ -1560,6 +1556,7 @@ void ws_set_local_storage(WS_CONNINFO *pwsc, void *ptr, void (*callback)(void *)
return; return;
if(pwsc->local_storage) { if(pwsc->local_storage) {
DPRINTF(E_FATAL,L_WS,"ls already allocated");
if(pwsc->storage_callback) { if(pwsc->storage_callback) {
pwsc->storage_callback(pwsc->local_storage); pwsc->storage_callback(pwsc->local_storage);
pwsc->local_storage=NULL; pwsc->local_storage=NULL;
@ -1579,6 +1576,7 @@ WS_CONNINFO *ws_thread_enum_first(WSHANDLE wsh, WSTHREADENUM *vpp) {
WS_CONNLIST *pconlist; WS_CONNLIST *pconlist;
pwsp = (WS_PRIVATE *)wsh; pwsp = (WS_PRIVATE *)wsh;
ws_lock_connlist(pwsp); ws_lock_connlist(pwsp);
pconlist = pwsp->connlist.next; pconlist = pwsp->connlist.next;