mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-12 08:47:50 +01:00
fix a couple of obvious bugs
This commit is contained in:
parent
d1e6a0d1d3
commit
ecc247d56d
2 changed files with 4 additions and 3 deletions
|
@ -129,13 +129,14 @@ writeBlobColumnData( const XP_U8* data, gsize len, XP_U16 strVersion, sqlite3* p
|
||||||
assertPrintResult( pDb, result, SQLITE_OK );
|
assertPrintResult( pDb, result, SQLITE_OK );
|
||||||
result = sqlite3_blob_close( blob );
|
result = sqlite3_blob_close( blob );
|
||||||
assertPrintResult( pDb, result, SQLITE_OK );
|
assertPrintResult( pDb, result, SQLITE_OK );
|
||||||
|
|
||||||
if ( !!stmt ) {
|
if ( !!stmt ) {
|
||||||
sqlite3_finalize( stmt );
|
sqlite3_finalize( stmt );
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_RETURNF( "%lld", curRow );
|
LOG_RETURNF( "%lld", curRow );
|
||||||
return curRow;
|
return curRow;
|
||||||
}
|
} /* writeBlobColumnData */
|
||||||
|
|
||||||
static sqlite3_int64
|
static sqlite3_int64
|
||||||
writeBlobColumnStream( XWStreamCtxt* stream, sqlite3* pDb, sqlite3_int64 curRow,
|
writeBlobColumnStream( XWStreamCtxt* stream, sqlite3* pDb, sqlite3_int64 curRow,
|
||||||
|
@ -326,7 +327,7 @@ getRelayIDsToRowsMap( sqlite3* pDb )
|
||||||
XP_UCHAR relayID[32];
|
XP_UCHAR relayID[32];
|
||||||
getColumnText( ppStmt, 0, relayID, VSIZE(relayID) );
|
getColumnText( ppStmt, 0, relayID, VSIZE(relayID) );
|
||||||
gpointer key = g_strdup( relayID );
|
gpointer key = g_strdup( relayID );
|
||||||
sqlite3_int64* value = g_malloc( sizeof( *key ) );
|
sqlite3_int64* value = g_malloc( sizeof( value ) );
|
||||||
*value = sqlite3_column_int64( ppStmt, 1 );
|
*value = sqlite3_column_int64( ppStmt, 1 );
|
||||||
g_hash_table_insert( table, key, value );
|
g_hash_table_insert( table, key, value );
|
||||||
/* XP_LOGF( "%s(): added map %s => %lld", __func__, (char*)key, *value ); */
|
/* XP_LOGF( "%s(): added map %s => %lld", __func__, (char*)key, *value ); */
|
||||||
|
|
|
@ -152,7 +152,7 @@ addJsonParams( CURL* curl, va_list ap )
|
||||||
json_object* param = va_arg(ap, json_object*);
|
json_object* param = va_arg(ap, json_object*);
|
||||||
XP_ASSERT( !!param );
|
XP_ASSERT( !!param );
|
||||||
|
|
||||||
const char* asStr = json_object_to_json_string( param );
|
const char* asStr = json_object_get_string( param );
|
||||||
XP_LOGF( "%s: adding param (with name %s): %s", __func__, name, asStr );
|
XP_LOGF( "%s: adding param (with name %s): %s", __func__, name, asStr );
|
||||||
|
|
||||||
char* curl_params = curl_easy_escape( curl, asStr, strlen(asStr) );
|
char* curl_params = curl_easy_escape( curl, asStr, strlen(asStr) );
|
||||||
|
|
Loading…
Add table
Reference in a new issue