* Minor code simplification.

This commit is contained in:
Justin Maggard 2010-08-28 08:01:51 +00:00
parent da624cedfd
commit 0a1c3a3b17

View File

@ -1771,18 +1771,12 @@ SendResp_dlnafile(struct upnphttp * h, char * object)
if( h->reqflags & FLAG_CAPTION )
{
sprintf(sql_buf, "SELECT 1 from CAPTIONS where ID = '%lld'", id);
ret = sql_get_table(db, sql_buf, &result, &rows, NULL);
if( ret == SQLITE_OK )
{
if( rows )
if( sql_get_int_field(db, "SELECT ID from CAPTIONS where ID = '%lld'", id) > 0 )
{
sprintf(hdr_buf, "CaptionInfo.sec: http://%s:%d/Captions/%lld.srt\r\n",
lan_addr[0].str, runtime_vars.port, id);
strcat(header, hdr_buf);
}
sqlite3_free_table(result);
}
}
sprintf(hdr_buf, "Accept-Ranges: bytes\r\n"