浏览代码

Deliver cells from safe_or_conn silently

Steven Engler 4 年之前
父节点
当前提交
a5dcd96b95
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10 0
      src/core/or/safe_connection.c

+ 10 - 0
src/core/or/safe_connection.c

@@ -1789,6 +1789,11 @@ process_cells_from_inbuf(safe_or_connection_t *safe_or_conn)
   tor_assert(safe_or_conn != NULL);
   tor_assert(safe_or_conn->waiting_for_link_protocol == false);
 
+  event_source_deliver_silently(TO_SAFE_CONN(safe_or_conn)->event_source,
+                                safe_or_conn_var_cell_ev, true);
+  event_source_deliver_silently(TO_SAFE_CONN(safe_or_conn)->event_source,
+                                safe_or_conn_fixed_cell_ev, true);
+
   while (true) {
     var_cell_t *var_cell = NULL;
     bool found_var_cell = fetch_var_cell(safe_or_conn, &var_cell);
@@ -1837,4 +1842,9 @@ process_cells_from_inbuf(safe_or_connection_t *safe_or_conn)
       }
     }
   }
+
+  event_source_wakeup_listener(TO_SAFE_CONN(safe_or_conn)->event_source,
+                               safe_or_conn_var_cell_ev);
+  event_source_wakeup_listener(TO_SAFE_CONN(safe_or_conn)->event_source,
+                               safe_or_conn_fixed_cell_ev);
 }