Commit 8060385c authored by Jeroen Vreeken's avatar Jeroen Vreeken
Browse files

Fix crash in mod_websocket.

Fix newline in log handling.
parent 4b4f6282
CFLAGS= -Wall -O3 -fPIC
CFLAGS= -Wall -g -fPIC
LDFLAGS= -lpthread
CFLAGS+=`pkg-config --cflags glib-2.0`
......
......@@ -2,7 +2,7 @@
LIBSRCS=mod_websocket_dt.c
LIBOBJS=$(LIBSRCS:.c=.lo)
CFLAGS+=-Wall \
CFLAGS+=-Wall -g \
-I../../../include \
-I../../../common/trace \
-I../../../common/utils \
......
......@@ -272,6 +272,9 @@ static void start_status(struct plugin_private *priv, char *ident)
status->priv = priv;
status->ident = ident;
priv->threads = realloc(priv->threads,
sizeof(pthread_t) * (priv->nr_threads + 1));
pthread_create(&priv->threads[priv->nr_threads], NULL,
status_thread, status);
......
......@@ -2138,11 +2138,11 @@ function manual_spg_keyup(e)
var log_elem = document.getElementById('log');
log.innerHTML = "log:";
log.innerHTML = "log:\n";
function log_status_cb(data)
{
log.innerHTML = log.innerHTML + "\n" + data;
log.innerHTML = log.innerHTML + data;
log.scrollTop = log.scrollHeight;
}
......@@ -2179,7 +2179,7 @@ function log_show_set(show)
function log_clear()
{
log.innerHTML = 'cleared';
log.innerHTML = 'cleared\n';
}
log_draw();
......
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