* Fix some possible memory leaks.

* Pay attention to the specified port number.
* Add support for multiple media directories, and allow content filtering on the directories.
This commit is contained in:
Justin Maggard
2009-02-03 03:36:59 +00:00
parent 3f454a5762
commit 0324818d86
11 changed files with 281 additions and 137 deletions

View File

@ -1178,6 +1178,9 @@ SendResp_dlnafile(struct upnphttp * h, char * object)
int sendfh;
#if USE_FORK
pid_t newpid = 0;
newpid = fork();
if( newpid )
return;
#endif
memset(header, 0, 1500);
@ -1192,15 +1195,10 @@ SendResp_dlnafile(struct upnphttp * h, char * object)
sqlite3_free_table(result);
return;
}
#if USE_FORK
newpid = fork();
if( newpid )
return;
#endif
path = result[3];
mime = result[4];
dlna = result[5];
printf("Serving DetailID: %s [%s]\n", object, path);
if( h->reqflags & FLAG_XFERSTREAMING )