aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2018-08-26 21:35:36 -0700
committerGravatar Yash Tibrewal <yashkt@google.com>2018-08-26 21:35:36 -0700
commit16af7fe9361f7a3bd0450e20702473fdadb2ecf5 (patch)
tree18b65b12e324c24b2f64f28daba236993bf06022
parent9c5bde5e4e2cc0c81c3c6411b3aa922d3e995a54 (diff)
more stuff
-rw-r--r--src/core/ext/transport/chttp2/transport/chttp2_transport.cc1
-rw-r--r--src/core/ext/transport/chttp2/transport/context_list.cc5
-rw-r--r--src/core/ext/transport/chttp2/transport/context_list.h3
-rw-r--r--src/core/lib/iomgr/iomgr.cc3
4 files changed, 8 insertions, 4 deletions
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
index f0dccefeee..8e07e3e4f9 100644
--- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
+++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
@@ -240,7 +240,6 @@ static void init_transport(grpc_chttp2_transport* t,
size_t i;
int j;
- grpc_tcp_set_write_timestamps_callback(grpc_core::ContextList::Execute);
GPR_ASSERT(strlen(GRPC_CHTTP2_CLIENT_CONNECT_STRING) ==
GRPC_CHTTP2_CLIENT_CONNECT_STRLEN);
diff --git a/src/core/ext/transport/chttp2/transport/context_list.cc b/src/core/ext/transport/chttp2/transport/context_list.cc
index 7bfc947ebb..9c46418ffd 100644
--- a/src/core/ext/transport/chttp2/transport/context_list.cc
+++ b/src/core/ext/transport/chttp2/transport/context_list.cc
@@ -37,8 +37,9 @@ void ContextList::Execute(void* arg, grpc_core::Timestamps* ts,
}
}
gpr_log(GPR_INFO, "one iteration %p %p", head, arg);
- // GRPC_CHTTP2_STREAM_UNREF(static_cast<grpc_chttp2_stream *>(head->s),
- // "timestamp exec");
+ GRPC_CHTTP2_STREAM_UNREF(static_cast<grpc_chttp2_stream *>(head->s),
+ "timestamp exec");
+ //grpc_stream_unref(head->s->refcount);
ptr = head;
head = head->next;
gpr_free(ptr);
diff --git a/src/core/ext/transport/chttp2/transport/context_list.h b/src/core/ext/transport/chttp2/transport/context_list.h
index 26b8da413e..8058bcde7c 100644
--- a/src/core/ext/transport/chttp2/transport/context_list.h
+++ b/src/core/ext/transport/chttp2/transport/context_list.h
@@ -34,7 +34,8 @@ class ContextList {
static void Append(ContextList** head, grpc_chttp2_stream* s) {
/* Make sure context is not already present */
ContextList* ptr = *head;
- // GRPC_CHTTP2_STREAM_REF(s, "timestamp");
+ GRPC_CHTTP2_STREAM_REF(s, "timestamp");
+ //grpc_stream_ref(s->refcount);
while (ptr != nullptr) {
if (ptr->s == s) {
GPR_ASSERT(false);
diff --git a/src/core/lib/iomgr/iomgr.cc b/src/core/lib/iomgr/iomgr.cc
index 46afda1774..7c0f19d0dd 100644
--- a/src/core/lib/iomgr/iomgr.cc
+++ b/src/core/lib/iomgr/iomgr.cc
@@ -33,6 +33,8 @@
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gpr/useful.h"
#include "src/core/lib/gprpp/thd.h"
+#include "src/core/ext/transport/chttp2/transport/context_list.h"
+#include "src/core/lib/iomgr/buffer_list.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/executor.h"
#include "src/core/lib/iomgr/iomgr_internal.h"
@@ -57,6 +59,7 @@ void grpc_iomgr_init() {
g_root_object.name = (char*)"root";
grpc_network_status_init();
grpc_iomgr_platform_init();
+ grpc_tcp_set_write_timestamps_callback(grpc_core::ContextList::Execute);
}
void grpc_iomgr_start() { grpc_timer_manager_init(); }