Move command queue to our own linked list, so we can attach promises.

Fix OS X build.
This commit is contained in:
Ian Gulliver
2015-06-28 09:54:03 -07:00
parent f3e38ec8a6
commit b29690734a
2 changed files with 93 additions and 24 deletions

View File

@@ -3,6 +3,12 @@
// Declarations that aren't in the public API but are available to the test suite.
struct cosmo_command {
struct cosmo_command *prev;
struct cosmo_command *next;
json_t *command;
};
struct cosmo {
char client_id[COSMO_UUID_SIZE];
char instance_id[COSMO_UUID_SIZE];
@@ -15,7 +21,8 @@ struct cosmo {
bool shutdown;
char *profile;
char *generation;
json_t *command_queue;
struct cosmo_command *command_queue_head;
struct cosmo_command *command_queue_tail;
json_t *ack;
json_t *subscriptions;
uint64_t next_delay_ms;