* Fix possible uninitialized value.
This commit is contained in:
@ -1301,6 +1301,9 @@ SendResp_dlnafile(struct upnphttp * h, char * object)
|
|||||||
sqlite_int64 id;
|
sqlite_int64 id;
|
||||||
int sendfh;
|
int sendfh;
|
||||||
static struct { sqlite_int64 id; char path[PATH_MAX]; char mime[32]; char dlna[64]; } last_file = { 0 };
|
static struct { sqlite_int64 id; char path[PATH_MAX]; char mime[32]; char dlna[64]; } last_file = { 0 };
|
||||||
|
#if USE_FORK
|
||||||
|
pid_t newpid = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
id = strtoll(object, NULL, 10);
|
id = strtoll(object, NULL, 10);
|
||||||
if( id != last_file.id )
|
if( id != last_file.id )
|
||||||
@ -1316,6 +1319,7 @@ SendResp_dlnafile(struct upnphttp * h, char * object)
|
|||||||
if( !rows )
|
if( !rows )
|
||||||
{
|
{
|
||||||
DPRINTF(E_WARN, L_HTTP, "%s not found, responding ERROR 404\n", object);
|
DPRINTF(E_WARN, L_HTTP, "%s not found, responding ERROR 404\n", object);
|
||||||
|
sqlite3_free_table(result);
|
||||||
Send404(h);
|
Send404(h);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
@ -1333,11 +1337,9 @@ SendResp_dlnafile(struct upnphttp * h, char * object)
|
|||||||
sqlite3_free_table(result);
|
sqlite3_free_table(result);
|
||||||
}
|
}
|
||||||
#if USE_FORK
|
#if USE_FORK
|
||||||
pid_t newpid = 0;
|
|
||||||
newpid = fork();
|
newpid = fork();
|
||||||
if( newpid )
|
if( newpid )
|
||||||
return;
|
return;
|
||||||
//goto error;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DPRINTF(E_INFO, L_HTTP, "Serving DetailID: %lld [%s]\n", id, last_file.path);
|
DPRINTF(E_INFO, L_HTTP, "Serving DetailID: %lld [%s]\n", id, last_file.path);
|
||||||
|
Reference in New Issue
Block a user