Last night I tracked down two major bugs in my thesis project prototype, and made one small performance change. The first bug was due to my Sqlite library not being compiled with the -DTHREADSAFE=1 macro defined. If you're using SQLite and getting a 'failed assertion in Mutex' error (or something like it) in the file os.c, then your library wasn't compiled with the THREADSAFE macro. The second bug I corrected was because I wasn't calling finalize() after doing queries (read only). SQLite locks the Database for reads, and stores the queries in a temporary database. If you don't call finalize() when your done processing the queries, you will eventually get a message saying that a temporary database file could not be opened. Finally, for good measure, I enclosed all operations that modify the DB into transactions. These three changes fixed the reliability of SQLite on the server side, which had been shaky. Previously, 10-40 client connections to the server caused the DB to exhaust its temporary file space. That is no longer an issue.
I thought that my thesis project prototype demo was this morning at 10 am, it is at eleven. In the meantime, I found the last bug and fixed it. I had a stringtype.find("-", spot) where I needed a stringtype.rfind("-").
After making the change, all the bugs on the Linux client/server are fixed. Now to wrap this sucker in a ./configure script and figure out how in the world libtool works. Polish, polish, polish.

Found the last bug and squashed it.