Mercurial > urweb
diff src/c/urweb.c @ 1763:22858505bb2d
Allow RPC and run it synchronously in onunload event.
author | Vladimir Shabanov <vshabanoff@gmail.com> |
---|---|
date | Wed, 16 May 2012 22:46:35 +0400 |
parents | e9587120831a |
children | 61c7eb1d3867 |
line wrap: on
line diff
--- a/src/c/urweb.c Sun May 13 17:41:21 2012 -0400 +++ b/src/c/urweb.c Wed May 16 22:46:35 2012 +0400 @@ -1336,8 +1336,8 @@ if (ctx->script_header[0] == 0) return ""; else { - char *r = uw_malloc(ctx, 22 + strlen(s)); - sprintf(r, " onunload='unload();%s'", s); + char *r = uw_malloc(ctx, 37 + strlen(s)); + sprintf(r, " onunload='unloading=true;%s;unload()'", s); return r; } }