Various win32 fixes

This commit is contained in:
Ron Pedde
2006-10-04 04:33:27 +00:00
parent 5509a8cffd
commit 4a9d8993b3
8 changed files with 303 additions and 6 deletions

View File

@@ -42,6 +42,8 @@
#include "out-daap.h"
#include "out-daap-proto.h"
#undef strsep /* FIXME */
/**
* Hold the inf for the output serializer
*/
@@ -235,6 +237,14 @@ void out_daap_cleanup(PRIVINFO *ppi) {
free(ppi);
}
char *_strsep(char **stringp, const char *delim) {
char *ret = *stringp;
if (ret == NULL) return(NULL); /* grrr */
if ((*stringp = strpbrk(*stringp, delim)) != NULL) {
*((*stringp)++) = '\0';
}
return(ret);
}
/**
* Handles authentication for the daap server. This isn't the
@@ -771,7 +781,7 @@ void out_daap_addplaylistitems(WS_CONNINFO *pwsc, PRIVINFO *ppi) {
tempstring=strdup(_ppi->ws_getvar(pwsc,"dmap.itemid"));
current=(unsigned char*)tempstring;
while((token=strsep((char**)(char*)&current,","))) {
while((token=_strsep((char**)(char*)&current,","))) {
if(token) {
/* FIXME: error handling */
_ppi->db_add_playlist_item(NULL,playlist_id,atoi(token));
@@ -846,7 +856,7 @@ void out_daap_deleteplaylistitems(WS_CONNINFO *pwsc, PRIVINFO *ppi) {
current=(unsigned char *)tempstring;
/* this looks strange, but gets rid of gcc 4 warnings */
while((token=strsep((char**)(char*)&current,","))) {
while((token=_strsep((char**)(char*)&current,","))) {
if(token) {
/* FIXME: Error handling */
_ppi->db_delete_playlist_item(NULL,playlist_id,atoi(token));

View File

@@ -89,7 +89,6 @@ PLUGIN_INFO _pi = {
PLUGIN_VERSION, /* version */
PLUGIN_TRANSCODE, /* type */
"ssc-wma/" VERSION, /* server */
NULL, /* url */
NULL, /* output fns */
NULL, /* event fns */
&_ptfn, /* fns */