diff --git a/httpd.c b/httpd.c index f130e529..6fa901d3 100644 --- a/httpd.c +++ b/httpd.c @@ -272,8 +272,8 @@ void httpd_server_poll(struct sched_ent *alarm) } current_httpd_requests = request; ++current_httpd_request_count; - request->payload_status = INVALID_RHIZOME_PAYLOAD_STATUS; - request->bundle_status = INVALID_RHIZOME_BUNDLE_STATUS; + request->payload_status = INVALID_RHIZOME_PAYLOAD_STATUS; // will cause FATAL unless set + request->bundle_status = INVALID_RHIZOME_BUNDLE_STATUS; // will cause FATAL unless set if (peerip) request->http.client_sockaddr_in = *peerip; request->http.uuid = http_request_uuid_counter; diff --git a/rhizome.h b/rhizome.h index a53dea12..aeeb1b4f 100644 --- a/rhizome.h +++ b/rhizome.h @@ -414,6 +414,8 @@ enum rhizome_bundle_status { RHIZOME_BUNDLE_STATUS_BUSY = 9, // the database is currently busy }; +// Useful for initialising a variable then checking later that it was set to a +// valid value (typically FATAL if not). #define INVALID_RHIZOME_BUNDLE_STATUS ((enum rhizome_bundle_status)-2) const char *rhizome_bundle_status_message(enum rhizome_bundle_status); @@ -431,6 +433,8 @@ enum rhizome_payload_status { RHIZOME_PAYLOAD_STATUS_EVICTED = 7, // other payloads in our store are more important }; +// Useful for initialising a variable then checking later that it was set to a +// valid value (typically FATAL if not). #define INVALID_RHIZOME_PAYLOAD_STATUS ((enum rhizome_payload_status)-2) const char *rhizome_payload_status_message(enum rhizome_payload_status);