X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=gameserver_db.h;fp=gameserver_db.h;h=b7f3360f52899d45cc27e8631b1a0a4fc3da8348;hb=f6bc1299d5b30e1aba87e6ce084bcd7eed22975f;hp=90852481e9ae1804b8523f78189c05cdd983bc51;hpb=6b036c10d38e7d691eb0bc06c29235b450c3ff10;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/gameserver_db.h b/gameserver_db.h index 9085248..b7f3360 100644 --- a/gameserver_db.h +++ b/gameserver_db.h @@ -277,7 +277,7 @@ static void *db_loop(void *_){ sqlite3_stmt *stmt = db_stmt( "CREATE TABLE IF NOT EXISTS \n" - " users(steamid BIGINT PRIMARY KEY, name VARCHAR(128), type INT);" ); + " users(steamid BIGINT UNIQUE, name VARCHAR(128), type INT);" ); if( stmt ){ int fc = sqlite3_step( stmt ); @@ -376,10 +376,10 @@ static void db_free(void){ } static db_request *db_alloc_request( u32 size ){ - u32 total = sizeof(db_request) + vg_align8(size); + u32 total = sizeof(db_request) + size; pthread_mutex_lock( &database.mux ); - vg_queue_frame *frame = vg_queue_alloc( &database.queue, size ); + vg_queue_frame *frame = vg_queue_alloc( &database.queue, total ); if( frame ){ db_request *req = (db_request *)frame->data;