diff options
author | 2009-03-28 11:15:42 -0400 | |
---|---|---|
committer | 2009-03-28 11:15:42 -0400 | |
commit | 213564f740d896c9a8bd86b5e2221d9434b126d3 (patch) | |
tree | a8c3921d96def7a0b75f2579a9eca46258bf9c83 | |
parent | 0168071775d98602c427b4b915fb6489cc2f10ff (diff) |
Switch back to starting listener on load
-rw-r--r-- | lib/js/urweb.js | 7 | ||||
-rw-r--r-- | src/c/urweb.c | 4 |
2 files changed, 2 insertions, 9 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js index 39f9f7cf..c7cecbbf 100644 --- a/lib/js/urweb.js +++ b/lib/js/urweb.js @@ -300,17 +300,10 @@ function listener() { connect(); } -var listener_started = false; - function rv(chn, parse, k) { if (chn < 0) whine("Out-of-bounds channel receive"); - if (!listener_started) { - listener_started = true; - listener(); - } - var ch; if (chn >= channels.length || channels[chn] == null) { diff --git a/src/c/urweb.c b/src/c/urweb.c index c8fe39ca..7c0cdb25 100644 --- a/src/c/urweb.c +++ b/src/c/urweb.c @@ -861,8 +861,8 @@ const char *uw_Basis_get_settings(uw_context ctx, uw_Basis_string onload) { int pass; client *c = uw_new_client(&pass); - char *r = uw_malloc(ctx, 41 + 3 * INTS_MAX + strlen(ctx->url_prefix) + strlen(onload)); - sprintf(r, " onload='client_id=%d;client_pass=%d;url_prefix=\"%s\";timeout=%d;%s'", + char *r = uw_malloc(ctx, 52 + 3 * INTS_MAX + strlen(ctx->url_prefix) + strlen(onload)); + sprintf(r, " onload='client_id=%d;client_pass=%d;url_prefix=\"%s\";timeout=%d;listener();%s'", (int)c->id, c->data.used.pass, ctx->url_prefix, |