summaryrefslogtreecommitdiff
path: root/src/c
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-03-22 15:16:34 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-03-22 15:16:34 -0400
commitbac67ca0f668cd381205b243355da8c906c58b5b (patch)
tree8f652c63195f27ebf46719ccc953c6597b079095 /src/c
parent2627ab6f5cfd96df06016a88b7e5a245e3ab9d8f (diff)
Press a button to send a message
Diffstat (limited to 'src/c')
-rw-r--r--src/c/urweb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c
index abe08221..a0bbe575 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -342,6 +342,7 @@ static void uw_channel_send(channel *ch, const char *msg) {
pthread_mutex_lock(&c->data.used.lock);
if (c->data.used.sock != -1) {
+ printf("Immediate send\n");
uw_really_send(c->data.used.sock, begin_msgs, sizeof(begin_msgs) - 1);
uw_really_send(c->data.used.sock, pre, preLen);
uw_really_send(c->data.used.sock, msg, len);
@@ -349,6 +350,7 @@ static void uw_channel_send(channel *ch, const char *msg) {
close(c->data.used.sock);
c->data.used.sock = -1;
} else {
+ printf("Delayed send\n");
buf_append(&c->data.used.msgs, pre, preLen);
buf_append(&c->data.used.msgs, msg, len);
buf_append(&c->data.used.msgs, "\n", 1);