Commit eb511528 authored by Geoff Simmons's avatar Geoff Simmons

trackrdrd: Fixed NULL/0 errors and #includes (for build on Debian)

vcl: 204 response fetched from ts-processor and cached
mock-processor: generate the 204 response, name changed to ts-processor
parent 2f911fa3
...@@ -97,7 +97,7 @@ static char ...@@ -97,7 +97,7 @@ static char
entry->end = strlen(entry->data); entry->end = strlen(entry->data);
entry->state = DATA_DONE; entry->state = DATA_DONE;
sprintf(errmsg, "SPMCQ_Enq: queue full"); sprintf(errmsg, "SPMCQ_Enq: queue full");
mu_assert(errmsg, SPMCQ_Enq(entry) != NULL); mu_assert(errmsg, SPMCQ_Enq(entry));
} }
WRK_Halt(); WRK_Halt();
......
...@@ -47,6 +47,8 @@ ...@@ -47,6 +47,8 @@
#include <sys/fcntl.h> #include <sys/fcntl.h>
#include <pthread.h> #include <pthread.h>
#include <stdarg.h> #include <stdarg.h>
#include <sys/wait.h>
#include <sys/types.h>
#include "compat/daemon.h" #include "compat/daemon.h"
...@@ -95,8 +97,8 @@ submit(unsigned xid) ...@@ -95,8 +97,8 @@ submit(unsigned xid)
CHECK_OBJ_NOTNULL(entry, DATA_MAGIC); CHECK_OBJ_NOTNULL(entry, DATA_MAGIC);
assert(entry->state == DATA_DONE); assert(entry->state == DATA_DONE);
LOG_Log(LOG_DEBUG, "submit: data=[%.*s]", entry->end, entry->data); LOG_Log(LOG_DEBUG, "submit: data=[%.*s]", entry->end, entry->data);
/* XXX: Termination */ while (!SPMCQ_Enq((void *) entry)) {
while (SPMCQ_Enq((void *) entry) == NULL) { tbl.wait_qfull++;
LOG_Log(LOG_ALERT, "%s", "Internal queue full, waiting for dequeue"); LOG_Log(LOG_ALERT, "%s", "Internal queue full, waiting for dequeue");
AZ(pthread_mutex_lock(&spmcq_nonfull_lock)); AZ(pthread_mutex_lock(&spmcq_nonfull_lock));
AZ(pthread_cond_wait(&spmcq_nonfull_cond, &spmcq_nonempty_lock)); AZ(pthread_cond_wait(&spmcq_nonfull_cond, &spmcq_nonempty_lock));
...@@ -409,7 +411,7 @@ child_main(struct VSM_data *vd, int endless) ...@@ -409,7 +411,7 @@ child_main(struct VSM_data *vd, int endless)
} }
errnum = WRK_Init(); errnum = WRK_Init();
if (errnum != NULL) { if (errnum != 0) {
LOG_Log(LOG_ERR, "Cannot prepare worker threads: %s", LOG_Log(LOG_ERR, "Cannot prepare worker threads: %s",
strerror(errnum)); strerror(errnum));
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment