Mercurial > urweb
comparison src/c/urweb.c @ 1042:a8a825861397
Explicitly abort in-flight RPCs onunload
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 24 Nov 2009 09:24:25 -0500 |
parents | dcc6093e9575 |
children | 93315ac00394 b06a2a65e670 |
comparison
equal
deleted
inserted
replaced
1041:0d767c8d2923 | 1042:a8a825861397 |
---|---|
1167 if (s[0] == 0) | 1167 if (s[0] == 0) |
1168 return ""; | 1168 return ""; |
1169 else { | 1169 else { |
1170 char *r = uw_malloc(ctx, 11 + strlen(s)); | 1170 char *r = uw_malloc(ctx, 11 + strlen(s)); |
1171 sprintf(r, " onload='%s'", s); | 1171 sprintf(r, " onload='%s'", s); |
1172 return r; | |
1173 } | |
1174 } | |
1175 | |
1176 uw_Basis_string uw_Basis_maybe_onunload(uw_context ctx, uw_Basis_string s) { | |
1177 if (ctx->script_header[0] == 0) | |
1178 return ""; | |
1179 else { | |
1180 char *r = uw_malloc(ctx, 22 + strlen(s)); | |
1181 sprintf(r, " onunload='unload();%s'", s); | |
1172 return r; | 1182 return r; |
1173 } | 1183 } |
1174 } | 1184 } |
1175 | 1185 |
1176 extern uw_Basis_string uw_cookie_sig(uw_context); | 1186 extern uw_Basis_string uw_cookie_sig(uw_context); |