void *mp)
{
application_t *server, *app;
- u32 table_index;
+ u32 table_index, server_index;
stream_session_t *listener;
if (session_endpoint_is_zero (sep))
if (application_has_local_scope (app))
{
table_index = application_local_session_table (app);
- app_index = session_lookup_local_session_endpoint (table_index, sep);
- server = application_get (app_index);
+ server_index = session_lookup_local_session_endpoint (table_index, sep);
+
/*
- * Server is willing to have a direct fifo connection created
- * instead of going through the state machine, etc.
+ * Break loop if rule in local table points to connecting app. This
+ * can happen if client is a generic proxy. Route connect through
+ * global table instead.
*/
- if (server && (server->flags & APP_OPTIONS_FLAGS_ACCEPT_REDIRECT))
- return app_connect_redirect (server, mp);
+ if (server_index != app_index)
+ {
+ server = application_get (server_index);
+ /*
+ * Server is willing to have a direct fifo connection created
+ * instead of going through the state machine, etc.
+ */
+ if (server && (server->flags & APP_OPTIONS_FLAGS_ACCEPT_REDIRECT))
+ return app_connect_redirect (server, mp);
+ }
}
/*
segment_manager_get_segment_info (sm->segment_indices[0],
&seg_name, &a->segment_size);
+ if (application_is_proxy (app))
+ application_setup_proxy (app);
+
a->segment_name_length = vec_len (seg_name);
a->segment_name = seg_name;
ASSERT (vec_len (a->segment_name) <= 128);