浏览代码

Filter insertion now actually works

tags/v0.9.3
Michael Brown 17 年前
父节点
当前提交
2d726144f7
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5
    1
      src/net/filter.c

+ 5
- 1
src/net/filter.c 查看文件

@@ -174,12 +174,16 @@ int insert_filter ( struct stream_application *app,
174 174
 		    struct filter_stream *filter ) {
175 175
 	struct stream_connection *conn = app->conn;
176 176
 
177
-	if ( ! app->conn ) {
177
+	if ( ! conn ) {
178 178
 		DBGC ( filter, "Filter %p cannot insert onto closed stream\n",
179 179
 		       filter );
180 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 187
 	app->conn = &filter->upstream;
184 188
 	conn->app = &filter->downstream;
185 189
 

正在加载...
取消
保存