Browse Source

Filter insertion now actually works

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
2d726144f7
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      src/net/filter.c

+ 5
- 1
src/net/filter.c View File

174
 		    struct filter_stream *filter ) {
174
 		    struct filter_stream *filter ) {
175
 	struct stream_connection *conn = app->conn;
175
 	struct stream_connection *conn = app->conn;
176
 
176
 
177
-	if ( ! app->conn ) {
177
+	if ( ! conn ) {
178
 		DBGC ( filter, "Filter %p cannot insert onto closed stream\n",
178
 		DBGC ( filter, "Filter %p cannot insert onto closed stream\n",
179
 		       filter );
179
 		       filter );
180
 		return -ENOTCONN;
180
 		return -ENOTCONN;
181
 	}
181
 	}
182
 
182
 
183
+	DBGC ( filter, "Filter %p inserted on stream %p\n", filter, app );
184
+
185
+	filter->upstream.app = app;
186
+	filter->downstream.conn = conn;
183
 	app->conn = &filter->upstream;
187
 	app->conn = &filter->upstream;
184
 	conn->app = &filter->downstream;
188
 	conn->app = &filter->downstream;
185
 
189
 

Loading…
Cancel
Save