diff src/c/urweb.c @ 700:db6ab16cd8f3

Initialize contexts a little more vigorously
author Adam Chlipala <adamc@hcoop.net>
date Sun, 05 Apr 2009 12:05:19 -0400
parents 9b29ce0babb8
children e28637743279
line wrap: on
line diff
--- a/src/c/urweb.c	Sun Apr 05 11:48:55 2009 -0400
+++ b/src/c/urweb.c	Sun Apr 05 12:05:19 2009 -0400
@@ -346,6 +346,10 @@
 
   ctx->timeout = uw_timeout;
 
+  ctx->client = NULL;
+
+  ctx->error_message[0] = 0;
+
   return ctx;
 }
 
@@ -1872,7 +1876,7 @@
 void uw_commit(uw_context ctx) {
   unsigned i;
 
-  if (uw_db_commit(ctx))
+  if (uw_db_commit(ctx)) 
     uw_error(ctx, FATAL, "Error running SQL COMMIT");
 
   for (i = 0; i < ctx->used_deltas; ++i) {