mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-18 20:57:56 +00:00
Add some comments to clarify Rhizome enums
This commit is contained in:
parent
0dd778bab5
commit
bdb3b99143
4
httpd.c
4
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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user