* Fix a few typos.

This commit is contained in:
Justin Maggard 2010-08-06 17:18:37 +00:00
parent c97d359fe2
commit 09ac5263a7
2 changed files with 10 additions and 8 deletions

12
sql.c
View File

@ -124,7 +124,7 @@ sql_get_int_field(sqlite3 *db, const char *fmt, ...)
}
char *
sql_get_text_field(void *dbh, const char *fmt, ...)
sql_get_text_field(void *db, const char *fmt, ...)
{
va_list ap;
int counter, result, len;
@ -134,9 +134,9 @@ sql_get_text_field(void *dbh, const char *fmt, ...)
va_start(ap, fmt);
if (dbh == NULL)
if (db == NULL)
{
DPRINTF(E_WARN, L_DB_SQL, "%s: dbh is NULL", __func__);
DPRINTF(E_WARN, L_DB_SQL, "%s: db is NULL", __func__);
return NULL;
}
@ -144,12 +144,12 @@ sql_get_text_field(void *dbh, const char *fmt, ...)
//DPRINTF(E_DEBUG, L_DB_SQL, "sql: %s\n", sql);
switch (sqlite3_prepare_v2(dbh, sql, -1, &stmt, NULL))
switch (sqlite3_prepare_v2(db, sql, -1, &stmt, NULL))
{
case SQLITE_OK:
break;
default:
DPRINTF(E_ERROR, L_DB_SQL, "prepare failed: %s\n%s\n", sqlite3_errmsg, sql);
DPRINTF(E_ERROR, L_DB_SQL, "prepare failed: %s\n%s\n", sqlite3_errmsg(db), sql);
sqlite3_free(sql);
return NULL;
}
@ -190,7 +190,7 @@ sql_get_text_field(void *dbh, const char *fmt, ...)
break;
default:
DPRINTF(E_WARN, L_DB_SQL, "%s: step failed: %s", __func__, sqlite3_errmsg);
DPRINTF(E_WARN, L_DB_SQL, "%s: step failed: %s", __func__, sqlite3_errmsg(db));
str = NULL;
break;
}

View File

@ -961,6 +961,8 @@ BrowseContentDirectory(struct upnphttp * h, const char * action)
ObjectId, ObjectId, ObjectId);
if( ptr )
ObjectId = ptr;
else
ObjectId = sqlite3_mprintf("%s", ObjectId);
}
}
DPRINTF(E_DEBUG, L_HTTP, "Browsing ContentDirectory:\n"