aboutsummaryrefslogtreecommitdiffstats
path: root/prototypes/connections/serve.c
diff options
context:
space:
mode:
Diffstat (limited to 'prototypes/connections/serve.c')
-rw-r--r--prototypes/connections/serve.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/prototypes/connections/serve.c b/prototypes/connections/serve.c
index 1eb5ca5..0029164 100644
--- a/prototypes/connections/serve.c
+++ b/prototypes/connections/serve.c
@@ -501,6 +501,9 @@ static const char *resolve(const Host *host, Connection *c, char *query, Route *
if (route->kind == ROUTE_NONE || (route->kind == ROUTE_OBJECT && !host->documents)) return "route";
if (route->kind == ROUTE_OBJECT) return NULL;
int found = route->kind == ROUTE_VIEW ? pure_module_view(m, c->key) : pure_module_input(m, c->key);
+ /* An output is the app's to send and a timer ticks by itself: neither is posted. */
+ if (found >= 0 && route->kind == ROUTE_INPUT &&
+ (m->input[found].kind == PURE_KIND_OUTPUT || m->input[found].kind == PURE_KIND_TIMER)) found = -1;
if (found < 0) return route->kind == ROUTE_VIEW ? "no_view" : "no_input";
*status = 400;
route->target = (uint32_t)found;