grpc 1.25.0 → 1.26.0.pre1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of grpc might be problematic. Click here for more details.

Files changed (278) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +782 -291
  3. data/include/grpc/impl/codegen/grpc_types.h +4 -0
  4. data/include/grpc/impl/codegen/port_platform.h +7 -0
  5. data/include/grpc/support/alloc.h +0 -16
  6. data/src/core/ext/filters/client_channel/backend_metric.cc +2 -2
  7. data/src/core/ext/filters/client_channel/backup_poller.cc +1 -1
  8. data/src/core/ext/filters/client_channel/channel_connectivity.cc +2 -2
  9. data/src/core/ext/filters/client_channel/client_channel.cc +95 -88
  10. data/src/core/ext/filters/client_channel/client_channel_channelz.cc +7 -7
  11. data/src/core/ext/filters/client_channel/client_channel_channelz.h +4 -2
  12. data/src/core/ext/filters/client_channel/client_channel_factory.cc +1 -1
  13. data/src/core/ext/filters/client_channel/client_channel_plugin.cc +3 -3
  14. data/src/core/ext/filters/client_channel/connector.h +40 -45
  15. data/src/core/ext/filters/client_channel/global_subchannel_pool.cc +10 -10
  16. data/src/core/ext/filters/client_channel/health/health_check_client.cc +16 -13
  17. data/src/core/ext/filters/client_channel/http_connect_handshaker.cc +66 -37
  18. data/src/core/ext/filters/client_channel/http_proxy.cc +107 -116
  19. data/src/core/ext/filters/client_channel/http_proxy.h +5 -1
  20. data/src/core/ext/filters/client_channel/lb_policy.cc +3 -3
  21. data/src/core/ext/filters/client_channel/lb_policy.h +9 -5
  22. data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc +10 -8
  23. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +18 -19
  24. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc +4 -3
  25. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h +4 -4
  26. data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc +1 -1
  27. data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +3 -3
  28. data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +3 -3
  29. data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +6 -9
  30. data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +368 -0
  31. data/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc +157 -77
  32. data/src/core/ext/filters/client_channel/lb_policy_registry.cc +5 -5
  33. data/src/core/ext/filters/client_channel/lb_policy_registry.h +1 -1
  34. data/src/core/ext/filters/client_channel/local_subchannel_pool.cc +8 -8
  35. data/src/core/ext/filters/client_channel/proxy_mapper.h +14 -34
  36. data/src/core/ext/filters/client_channel/proxy_mapper_registry.cc +46 -79
  37. data/src/core/ext/filters/client_channel/proxy_mapper_registry.h +23 -17
  38. data/src/core/ext/filters/client_channel/resolver.cc +2 -1
  39. data/src/core/ext/filters/client_channel/resolver.h +2 -2
  40. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +1 -1
  41. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc +4 -4
  42. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h +1 -1
  43. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc +13 -10
  44. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +3 -2
  45. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +9 -8
  46. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +17 -16
  47. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +2 -2
  48. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc +4 -4
  49. data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc +9 -9
  50. data/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc +5 -3
  51. data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +1 -1
  52. data/src/core/ext/filters/client_channel/resolver_factory.h +3 -3
  53. data/src/core/ext/filters/client_channel/resolver_registry.cc +14 -12
  54. data/src/core/ext/filters/client_channel/resolver_registry.h +6 -4
  55. data/src/core/ext/filters/client_channel/resolver_result_parsing.cc +6 -6
  56. data/src/core/ext/filters/client_channel/resolver_result_parsing.h +6 -6
  57. data/src/core/ext/filters/client_channel/resolving_lb_policy.cc +5 -5
  58. data/src/core/ext/filters/client_channel/resolving_lb_policy.h +3 -3
  59. data/src/core/ext/filters/client_channel/service_config.cc +15 -14
  60. data/src/core/ext/filters/client_channel/service_config.h +14 -19
  61. data/src/core/ext/filters/client_channel/subchannel.cc +38 -36
  62. data/src/core/ext/filters/client_channel/subchannel.h +11 -12
  63. data/src/core/ext/filters/client_channel/subchannel_interface.h +1 -1
  64. data/src/core/ext/filters/client_channel/xds/xds_api.cc +19 -9
  65. data/src/core/ext/filters/client_channel/xds/xds_api.h +19 -9
  66. data/src/core/ext/filters/client_channel/xds/xds_bootstrap.cc +3 -3
  67. data/src/core/ext/filters/client_channel/xds/xds_bootstrap.h +6 -5
  68. data/src/core/ext/filters/client_channel/xds/xds_client.cc +58 -31
  69. data/src/core/ext/filters/client_channel/xds/xds_client.h +20 -15
  70. data/src/core/ext/filters/client_channel/xds/xds_client_stats.cc +5 -3
  71. data/src/core/ext/filters/client_channel/xds/xds_client_stats.h +18 -15
  72. data/src/core/ext/filters/client_idle/client_idle_filter.cc +10 -10
  73. data/src/core/ext/filters/deadline/deadline_filter.cc +15 -13
  74. data/src/core/ext/filters/http/client/http_client_filter.cc +12 -12
  75. data/src/core/ext/filters/http/client_authority_filter.cc +3 -3
  76. data/src/core/ext/filters/http/message_compress/message_compress_filter.cc +13 -7
  77. data/src/core/ext/filters/http/server/http_server_filter.cc +14 -13
  78. data/src/core/ext/filters/max_age/max_age_filter.cc +16 -14
  79. data/src/core/ext/filters/message_size/message_size_filter.cc +10 -8
  80. data/src/core/ext/filters/message_size/message_size_filter.h +1 -1
  81. data/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc +9 -8
  82. data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +141 -174
  83. data/src/core/ext/transport/chttp2/client/chttp2_connector.h +31 -1
  84. data/src/core/ext/transport/chttp2/client/insecure/channel_create.cc +7 -6
  85. data/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +14 -12
  86. data/src/core/ext/transport/chttp2/server/chttp2_server.cc +8 -5
  87. data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +46 -38
  88. data/src/core/ext/transport/chttp2/transport/context_list.cc +2 -2
  89. data/src/core/ext/transport/chttp2/transport/flow_control.h +0 -5
  90. data/src/core/ext/transport/chttp2/transport/frame_data.cc +6 -7
  91. data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +2 -2
  92. data/src/core/ext/transport/chttp2/transport/frame_ping.cc +1 -1
  93. data/src/core/ext/transport/chttp2/transport/frame_settings.cc +4 -3
  94. data/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +5 -5
  95. data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +11 -8
  96. data/src/core/ext/transport/chttp2/transport/internal.h +3 -3
  97. data/src/core/ext/transport/chttp2/transport/parsing.cc +4 -4
  98. data/src/core/ext/transport/chttp2/transport/writing.cc +3 -2
  99. data/src/core/ext/transport/inproc/inproc_transport.cc +65 -41
  100. data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c +0 -1
  101. data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.c +141 -70
  102. data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.h +352 -118
  103. data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c +0 -1
  104. data/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c +0 -1
  105. data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c +8 -4
  106. data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h +65 -0
  107. data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c +0 -1
  108. data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c +16 -2
  109. data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h +36 -0
  110. data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c +12 -5
  111. data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h +34 -0
  112. data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c +1 -2
  113. data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c +13 -12
  114. data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h +28 -24
  115. data/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c +0 -1
  116. data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c +5 -4
  117. data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h +13 -0
  118. data/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c +0 -1
  119. data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.c +23 -23
  120. data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.h +48 -44
  121. data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c +0 -1
  122. data/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c +0 -1
  123. data/src/core/ext/upb-generated/envoy/type/http.upb.c +16 -0
  124. data/src/core/ext/upb-generated/envoy/type/http.upb.h +36 -0
  125. data/src/core/ext/upb-generated/envoy/type/percent.upb.c +0 -1
  126. data/src/core/ext/upb-generated/envoy/type/range.upb.c +0 -1
  127. data/src/core/lib/avl/avl.cc +1 -1
  128. data/src/core/lib/channel/channel_stack.cc +1 -1
  129. data/src/core/lib/channel/channel_stack.h +16 -4
  130. data/src/core/lib/channel/channel_trace.cc +4 -4
  131. data/src/core/lib/channel/channelz.cc +46 -46
  132. data/src/core/lib/channel/channelz.h +37 -35
  133. data/src/core/lib/channel/channelz_registry.cc +2 -2
  134. data/src/core/lib/channel/channelz_registry.h +1 -1
  135. data/src/core/lib/channel/connected_channel.cc +3 -2
  136. data/src/core/lib/channel/handshaker.cc +1 -1
  137. data/src/core/lib/channel/handshaker_registry.cc +5 -5
  138. data/src/core/lib/channel/handshaker_registry.h +3 -3
  139. data/src/core/lib/compression/message_compress.cc +3 -2
  140. data/src/core/lib/compression/stream_compression_identity.cc +5 -7
  141. data/src/core/lib/gpr/alloc.cc +4 -29
  142. data/src/core/lib/gpr/cpu_linux.cc +1 -1
  143. data/src/core/lib/gprpp/fork.cc +4 -4
  144. data/src/core/lib/gprpp/global_config_env.cc +7 -7
  145. data/src/core/lib/gprpp/global_config_env.h +2 -2
  146. data/src/core/lib/gprpp/host_port.cc +8 -8
  147. data/src/core/lib/gprpp/host_port.h +3 -3
  148. data/src/core/lib/gprpp/inlined_vector.h +13 -0
  149. data/src/core/lib/gprpp/map.h +2 -9
  150. data/src/core/lib/gprpp/memory.h +12 -98
  151. data/src/core/lib/gprpp/orphanable.h +3 -3
  152. data/src/core/lib/gprpp/ref_counted.h +3 -3
  153. data/src/core/lib/gprpp/ref_counted_ptr.h +1 -1
  154. data/src/core/lib/gprpp/string_view.h +45 -23
  155. data/src/core/lib/gprpp/thd.h +1 -1
  156. data/src/core/lib/gprpp/thd_posix.cc +6 -5
  157. data/src/core/lib/gprpp/thd_windows.cc +3 -3
  158. data/src/core/lib/http/httpcli.cc +1 -1
  159. data/src/core/lib/http/httpcli_security_connector.cc +3 -3
  160. data/src/core/lib/iomgr/buffer_list.cc +10 -5
  161. data/src/core/lib/iomgr/call_combiner.cc +7 -6
  162. data/src/core/lib/iomgr/call_combiner.h +4 -3
  163. data/src/core/lib/iomgr/cfstream_handle.cc +2 -2
  164. data/src/core/lib/iomgr/closure.h +33 -135
  165. data/src/core/lib/iomgr/combiner.cc +10 -17
  166. data/src/core/lib/iomgr/combiner.h +0 -2
  167. data/src/core/lib/iomgr/endpoint_cfstream.cc +2 -2
  168. data/src/core/lib/iomgr/endpoint_pair_posix.cc +1 -1
  169. data/src/core/lib/iomgr/ev_epoll1_linux.cc +3 -2
  170. data/src/core/lib/iomgr/ev_epollex_linux.cc +23 -13
  171. data/src/core/lib/iomgr/ev_poll_posix.cc +30 -17
  172. data/src/core/lib/iomgr/exec_ctx.cc +52 -5
  173. data/src/core/lib/iomgr/exec_ctx.h +6 -2
  174. data/src/core/lib/iomgr/executor.cc +16 -37
  175. data/src/core/lib/iomgr/executor.h +4 -7
  176. data/src/core/lib/iomgr/executor/threadpool.cc +4 -4
  177. data/src/core/lib/iomgr/iomgr_custom.cc +1 -1
  178. data/src/core/lib/iomgr/lockfree_event.cc +9 -8
  179. data/src/core/lib/iomgr/logical_thread.cc +103 -0
  180. data/src/core/lib/iomgr/logical_thread.h +52 -0
  181. data/src/core/lib/iomgr/pollset_custom.cc +5 -5
  182. data/src/core/lib/iomgr/pollset_set_custom.cc +9 -9
  183. data/src/core/lib/iomgr/pollset_windows.cc +16 -2
  184. data/src/core/lib/iomgr/port.h +3 -0
  185. data/src/core/lib/iomgr/resolve_address_custom.cc +4 -4
  186. data/src/core/lib/iomgr/resolve_address_posix.cc +8 -9
  187. data/src/core/lib/iomgr/resolve_address_windows.cc +4 -6
  188. data/src/core/lib/iomgr/resource_quota.cc +26 -21
  189. data/src/core/lib/iomgr/socket_utils_common_posix.cc +11 -0
  190. data/src/core/lib/iomgr/socket_windows.cc +2 -2
  191. data/src/core/lib/iomgr/tcp_client_cfstream.cc +2 -2
  192. data/src/core/lib/iomgr/tcp_client_custom.cc +2 -2
  193. data/src/core/lib/iomgr/tcp_client_posix.cc +5 -4
  194. data/src/core/lib/iomgr/tcp_client_windows.cc +2 -2
  195. data/src/core/lib/iomgr/tcp_custom.cc +10 -9
  196. data/src/core/lib/iomgr/tcp_posix.cc +19 -15
  197. data/src/core/lib/iomgr/tcp_server_custom.cc +3 -2
  198. data/src/core/lib/iomgr/tcp_server_posix.cc +5 -4
  199. data/src/core/lib/iomgr/tcp_server_windows.cc +5 -3
  200. data/src/core/lib/iomgr/tcp_windows.cc +16 -13
  201. data/src/core/lib/iomgr/timer_custom.cc +4 -3
  202. data/src/core/lib/iomgr/timer_generic.cc +11 -9
  203. data/src/core/lib/iomgr/udp_server.cc +16 -13
  204. data/src/core/lib/security/credentials/alts/alts_credentials.cc +8 -5
  205. data/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc +45 -57
  206. data/src/core/lib/security/credentials/composite/composite_credentials.cc +7 -6
  207. data/src/core/lib/security/credentials/credentials.cc +8 -8
  208. data/src/core/lib/security/credentials/credentials.h +5 -5
  209. data/src/core/lib/security/credentials/fake/fake_credentials.cc +5 -5
  210. data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +1 -1
  211. data/src/core/lib/security/credentials/iam/iam_credentials.cc +4 -4
  212. data/src/core/lib/security/credentials/jwt/jwt_credentials.cc +4 -4
  213. data/src/core/lib/security/credentials/jwt/jwt_verifier.cc +2 -2
  214. data/src/core/lib/security/credentials/local/local_credentials.cc +3 -3
  215. data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +13 -11
  216. data/src/core/lib/security/credentials/plugin/plugin_credentials.cc +6 -5
  217. data/src/core/lib/security/credentials/ssl/ssl_credentials.cc +4 -4
  218. data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc +5 -5
  219. data/src/core/lib/security/credentials/tls/spiffe_credentials.cc +2 -2
  220. data/src/core/lib/security/security_connector/alts/alts_security_connector.cc +28 -22
  221. data/src/core/lib/security/security_connector/alts/alts_security_connector.h +5 -0
  222. data/src/core/lib/security/security_connector/fake/fake_security_connector.cc +10 -10
  223. data/src/core/lib/security/security_connector/load_system_roots_linux.cc +2 -1
  224. data/src/core/lib/security/security_connector/local/local_security_connector.cc +8 -8
  225. data/src/core/lib/security/security_connector/security_connector.h +1 -1
  226. data/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +9 -9
  227. data/src/core/lib/security/security_connector/ssl_utils.cc +5 -4
  228. data/src/core/lib/security/security_connector/tls/spiffe_security_connector.cc +14 -15
  229. data/src/core/lib/security/transport/client_auth_filter.cc +4 -3
  230. data/src/core/lib/security/transport/secure_endpoint.cc +9 -8
  231. data/src/core/lib/security/transport/security_handshaker.cc +67 -23
  232. data/src/core/lib/security/transport/server_auth_filter.cc +6 -5
  233. data/src/core/lib/security/transport/target_authority_table.h +1 -1
  234. data/src/core/lib/slice/b64.cc +3 -4
  235. data/src/core/lib/slice/b64.h +1 -2
  236. data/src/core/lib/slice/slice.cc +8 -13
  237. data/src/core/lib/surface/call.cc +19 -19
  238. data/src/core/lib/surface/call.h +6 -7
  239. data/src/core/lib/surface/call_log_batch.cc +1 -2
  240. data/src/core/lib/surface/channel.cc +17 -18
  241. data/src/core/lib/surface/channel.h +4 -19
  242. data/src/core/lib/surface/channel_ping.cc +1 -1
  243. data/src/core/lib/surface/completion_queue.cc +21 -22
  244. data/src/core/lib/surface/completion_queue_factory.cc +1 -1
  245. data/src/core/lib/surface/init.cc +1 -1
  246. data/src/core/lib/surface/init_secure.cc +2 -2
  247. data/src/core/lib/surface/lame_client.cc +10 -12
  248. data/src/core/lib/surface/server.cc +24 -18
  249. data/src/core/lib/surface/version.cc +2 -2
  250. data/src/core/lib/transport/byte_stream.cc +2 -2
  251. data/src/core/lib/transport/byte_stream.h +2 -1
  252. data/src/core/lib/transport/connectivity_state.cc +4 -4
  253. data/src/core/lib/transport/connectivity_state.h +2 -2
  254. data/src/core/lib/transport/metadata.cc +8 -10
  255. data/src/core/lib/transport/metadata.h +5 -8
  256. data/src/core/lib/transport/metadata_batch.cc +6 -0
  257. data/src/core/lib/transport/static_metadata.cc +2 -4
  258. data/src/core/lib/transport/status_metadata.cc +7 -0
  259. data/src/core/lib/transport/status_metadata.h +18 -0
  260. data/src/core/lib/transport/transport.cc +9 -7
  261. data/src/core/plugin_registry/grpc_plugin_registry.cc +4 -0
  262. data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +292 -43
  263. data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +197 -46
  264. data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h +4 -2
  265. data/src/core/tsi/alts/handshaker/alts_tsi_handshaker_private.h +5 -0
  266. data/src/core/tsi/ssl/session_cache/ssl_session.h +1 -1
  267. data/src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc +1 -1
  268. data/src/core/tsi/ssl/session_cache/ssl_session_cache.cc +4 -4
  269. data/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc +1 -1
  270. data/src/core/tsi/ssl_transport_security.cc +2 -1
  271. data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +0 -4
  272. data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +0 -6
  273. data/src/ruby/lib/grpc/version.rb +1 -1
  274. data/third_party/upb/upb/decode.c +1 -0
  275. metadata +34 -32
  276. data/src/core/ext/filters/client_channel/connector.cc +0 -41
  277. data/src/core/ext/filters/client_channel/proxy_mapper.cc +0 -48
  278. data/src/core/lib/gprpp/set.h +0 -33
@@ -68,6 +68,10 @@ class SecurityHandshaker : public Handshaker {
68
68
 
69
69
  static void OnHandshakeDataReceivedFromPeerFn(void* arg, grpc_error* error);
70
70
  static void OnHandshakeDataSentToPeerFn(void* arg, grpc_error* error);
71
+ static void OnHandshakeDataReceivedFromPeerFnScheduler(void* arg,
72
+ grpc_error* error);
73
+ static void OnHandshakeDataSentToPeerFnScheduler(void* arg,
74
+ grpc_error* error);
71
75
  static void OnHandshakeNextDoneGrpcWrapper(
72
76
  tsi_result result, void* user_data, const unsigned char* bytes_to_send,
73
77
  size_t bytes_to_send_size, tsi_handshaker_result* handshaker_result);
@@ -118,12 +122,6 @@ SecurityHandshaker::SecurityHandshaker(tsi_handshaker* handshaker,
118
122
  }
119
123
  gpr_mu_init(&mu_);
120
124
  grpc_slice_buffer_init(&outgoing_);
121
- GRPC_CLOSURE_INIT(&on_handshake_data_sent_to_peer_,
122
- &SecurityHandshaker::OnHandshakeDataSentToPeerFn, this,
123
- grpc_schedule_on_exec_ctx);
124
- GRPC_CLOSURE_INIT(&on_handshake_data_received_from_peer_,
125
- &SecurityHandshaker::OnHandshakeDataReceivedFromPeerFn,
126
- this, grpc_schedule_on_exec_ctx);
127
125
  GRPC_CLOSURE_INIT(&on_peer_checked_, &SecurityHandshaker::OnPeerCheckedFn,
128
126
  this, grpc_schedule_on_exec_ctx);
129
127
  }
@@ -186,6 +184,7 @@ void SecurityHandshaker::HandshakeFailedLocked(grpc_error* error) {
186
184
  gpr_log(GPR_DEBUG, "Security handshake failed: %s", msg);
187
185
 
188
186
  if (!is_shutdown_) {
187
+ tsi_handshaker_shutdown(handshaker_);
189
188
  // TODO(ctiller): It is currently necessary to shutdown endpoints
190
189
  // before destroying them, even if we know that there are no
191
190
  // pending read/write callbacks. This should be fixed, at which
@@ -199,7 +198,7 @@ void SecurityHandshaker::HandshakeFailedLocked(grpc_error* error) {
199
198
  is_shutdown_ = true;
200
199
  }
201
200
  // Invoke callback.
202
- GRPC_CLOSURE_SCHED(on_handshake_done_, error);
201
+ ExecCtx::Run(DEBUG_LOCATION, on_handshake_done_, error);
203
202
  }
204
203
 
205
204
  void SecurityHandshaker::OnPeerCheckedInner(grpc_error* error) {
@@ -259,7 +258,7 @@ void SecurityHandshaker::OnPeerCheckedInner(grpc_error* error) {
259
258
  args_->args = grpc_channel_args_copy_and_add(tmp_args, &auth_context_arg, 1);
260
259
  grpc_channel_args_destroy(tmp_args);
261
260
  // Invoke callback.
262
- GRPC_CLOSURE_SCHED(on_handshake_done_, GRPC_ERROR_NONE);
261
+ ExecCtx::Run(DEBUG_LOCATION, on_handshake_done_, GRPC_ERROR_NONE);
263
262
  // Set shutdown to true so that subsequent calls to
264
263
  // security_handshaker_shutdown() do nothing.
265
264
  is_shutdown_ = true;
@@ -294,8 +293,13 @@ grpc_error* SecurityHandshaker::OnHandshakeNextDoneLocked(
294
293
  // Read more if we need to.
295
294
  if (result == TSI_INCOMPLETE_DATA) {
296
295
  GPR_ASSERT(bytes_to_send_size == 0);
297
- grpc_endpoint_read(args_->endpoint, args_->read_buffer,
298
- &on_handshake_data_received_from_peer_, /*urgent=*/true);
296
+ grpc_endpoint_read(
297
+ args_->endpoint, args_->read_buffer,
298
+ GRPC_CLOSURE_INIT(
299
+ &on_handshake_data_received_from_peer_,
300
+ &SecurityHandshaker::OnHandshakeDataReceivedFromPeerFnScheduler,
301
+ this, grpc_schedule_on_exec_ctx),
302
+ /*urgent=*/true);
299
303
  return error;
300
304
  }
301
305
  if (result != TSI_OK) {
@@ -313,12 +317,22 @@ grpc_error* SecurityHandshaker::OnHandshakeNextDoneLocked(
313
317
  reinterpret_cast<const char*>(bytes_to_send), bytes_to_send_size);
314
318
  grpc_slice_buffer_reset_and_unref_internal(&outgoing_);
315
319
  grpc_slice_buffer_add(&outgoing_, to_send);
316
- grpc_endpoint_write(args_->endpoint, &outgoing_,
317
- &on_handshake_data_sent_to_peer_, nullptr);
320
+ grpc_endpoint_write(
321
+ args_->endpoint, &outgoing_,
322
+ GRPC_CLOSURE_INIT(
323
+ &on_handshake_data_sent_to_peer_,
324
+ &SecurityHandshaker::OnHandshakeDataSentToPeerFnScheduler, this,
325
+ grpc_schedule_on_exec_ctx),
326
+ nullptr);
318
327
  } else if (handshaker_result == nullptr) {
319
328
  // There is nothing to send, but need to read from peer.
320
- grpc_endpoint_read(args_->endpoint, args_->read_buffer,
321
- &on_handshake_data_received_from_peer_, /*urgent=*/true);
329
+ grpc_endpoint_read(
330
+ args_->endpoint, args_->read_buffer,
331
+ GRPC_CLOSURE_INIT(
332
+ &on_handshake_data_received_from_peer_,
333
+ &SecurityHandshaker::OnHandshakeDataReceivedFromPeerFnScheduler,
334
+ this, grpc_schedule_on_exec_ctx),
335
+ /*urgent=*/true);
322
336
  } else {
323
337
  // Handshake has finished, check peer and so on.
324
338
  error = CheckPeerLocked();
@@ -361,6 +375,19 @@ grpc_error* SecurityHandshaker::DoHandshakerNextLocked(
361
375
  hs_result);
362
376
  }
363
377
 
378
+ // This callback might be run inline while we are still holding on to the mutex,
379
+ // so schedule OnHandshakeDataReceivedFromPeerFn on ExecCtx to avoid a deadlock.
380
+ void SecurityHandshaker::OnHandshakeDataReceivedFromPeerFnScheduler(
381
+ void* arg, grpc_error* error) {
382
+ SecurityHandshaker* h = static_cast<SecurityHandshaker*>(arg);
383
+ grpc_core::ExecCtx::Run(
384
+ DEBUG_LOCATION,
385
+ GRPC_CLOSURE_INIT(&h->on_handshake_data_received_from_peer_,
386
+ &SecurityHandshaker::OnHandshakeDataReceivedFromPeerFn,
387
+ h, grpc_schedule_on_exec_ctx),
388
+ GRPC_ERROR_REF(error));
389
+ }
390
+
364
391
  void SecurityHandshaker::OnHandshakeDataReceivedFromPeerFn(void* arg,
365
392
  grpc_error* error) {
366
393
  RefCountedPtr<SecurityHandshaker> h(static_cast<SecurityHandshaker*>(arg));
@@ -382,6 +409,19 @@ void SecurityHandshaker::OnHandshakeDataReceivedFromPeerFn(void* arg,
382
409
  }
383
410
  }
384
411
 
412
+ // This callback might be run inline while we are still holding on to the mutex,
413
+ // so schedule OnHandshakeDataSentToPeerFn on ExecCtx to avoid a deadlock.
414
+ void SecurityHandshaker::OnHandshakeDataSentToPeerFnScheduler(
415
+ void* arg, grpc_error* error) {
416
+ SecurityHandshaker* h = static_cast<SecurityHandshaker*>(arg);
417
+ grpc_core::ExecCtx::Run(
418
+ DEBUG_LOCATION,
419
+ GRPC_CLOSURE_INIT(&h->on_handshake_data_sent_to_peer_,
420
+ &SecurityHandshaker::OnHandshakeDataSentToPeerFn, h,
421
+ grpc_schedule_on_exec_ctx),
422
+ GRPC_ERROR_REF(error));
423
+ }
424
+
385
425
  void SecurityHandshaker::OnHandshakeDataSentToPeerFn(void* arg,
386
426
  grpc_error* error) {
387
427
  RefCountedPtr<SecurityHandshaker> h(static_cast<SecurityHandshaker*>(arg));
@@ -393,9 +433,13 @@ void SecurityHandshaker::OnHandshakeDataSentToPeerFn(void* arg,
393
433
  }
394
434
  // We may be done.
395
435
  if (h->handshaker_result_ == nullptr) {
396
- grpc_endpoint_read(h->args_->endpoint, h->args_->read_buffer,
397
- &h->on_handshake_data_received_from_peer_,
398
- /*urgent=*/true);
436
+ grpc_endpoint_read(
437
+ h->args_->endpoint, h->args_->read_buffer,
438
+ GRPC_CLOSURE_INIT(
439
+ &h->on_handshake_data_received_from_peer_,
440
+ &SecurityHandshaker::OnHandshakeDataReceivedFromPeerFnScheduler,
441
+ h.get(), grpc_schedule_on_exec_ctx),
442
+ /*urgent=*/true);
399
443
  } else {
400
444
  error = h->CheckPeerLocked();
401
445
  if (error != GRPC_ERROR_NONE) {
@@ -421,7 +465,7 @@ void SecurityHandshaker::Shutdown(grpc_error* why) {
421
465
  GRPC_ERROR_UNREF(why);
422
466
  }
423
467
 
424
- void SecurityHandshaker::DoHandshake(grpc_tcp_server_acceptor* acceptor,
468
+ void SecurityHandshaker::DoHandshake(grpc_tcp_server_acceptor* /*acceptor*/,
425
469
  grpc_closure* on_handshake_done,
426
470
  HandshakerArgs* args) {
427
471
  auto ref = Ref();
@@ -446,12 +490,12 @@ class FailHandshaker : public Handshaker {
446
490
  public:
447
491
  const char* name() const override { return "security_fail"; }
448
492
  void Shutdown(grpc_error* why) override { GRPC_ERROR_UNREF(why); }
449
- void DoHandshake(grpc_tcp_server_acceptor* acceptor,
493
+ void DoHandshake(grpc_tcp_server_acceptor* /*acceptor*/,
450
494
  grpc_closure* on_handshake_done,
451
- HandshakerArgs* args) override {
452
- GRPC_CLOSURE_SCHED(on_handshake_done,
453
- GRPC_ERROR_CREATE_FROM_STATIC_STRING(
454
- "Failed to create security handshaker"));
495
+ HandshakerArgs* /*args*/) override {
496
+ ExecCtx::Run(DEBUG_LOCATION, on_handshake_done,
497
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING(
498
+ "Failed to create security handshaker"));
455
499
  }
456
500
 
457
501
  private:
@@ -159,7 +159,7 @@ static void on_md_processing_done_inner(grpc_call_element* elem,
159
159
  calld->recv_trailing_metadata_error,
160
160
  "continue recv_trailing_metadata_ready");
161
161
  }
162
- GRPC_CLOSURE_SCHED(closure, error);
162
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, closure, error);
163
163
  }
164
164
 
165
165
  // Called from application code.
@@ -238,7 +238,7 @@ static void recv_initial_metadata_ready(void* arg, grpc_error* error) {
238
238
  calld->recv_trailing_metadata_error,
239
239
  "continue recv_trailing_metadata_ready");
240
240
  }
241
- GRPC_CLOSURE_RUN(closure, GRPC_ERROR_REF(error));
241
+ grpc_core::Closure::Run(DEBUG_LOCATION, closure, GRPC_ERROR_REF(error));
242
242
  }
243
243
 
244
244
  static void recv_trailing_metadata_ready(void* user_data, grpc_error* err) {
@@ -254,7 +254,8 @@ static void recv_trailing_metadata_ready(void* user_data, grpc_error* err) {
254
254
  }
255
255
  err = grpc_error_add_child(
256
256
  GRPC_ERROR_REF(err), GRPC_ERROR_REF(calld->recv_initial_metadata_error));
257
- GRPC_CLOSURE_RUN(calld->original_recv_trailing_metadata_ready, err);
257
+ grpc_core::Closure::Run(DEBUG_LOCATION,
258
+ calld->original_recv_trailing_metadata_ready, err);
258
259
  }
259
260
 
260
261
  static void server_auth_start_transport_stream_op_batch(
@@ -286,8 +287,8 @@ static grpc_error* server_auth_init_call_elem(
286
287
 
287
288
  /* Destructor for call_data */
288
289
  static void server_auth_destroy_call_elem(
289
- grpc_call_element* elem, const grpc_call_final_info* final_info,
290
- grpc_closure* ignored) {
290
+ grpc_call_element* elem, const grpc_call_final_info* /*final_info*/,
291
+ grpc_closure* /*ignored*/) {
291
292
  call_data* calld = static_cast<call_data*>(elem->call_data);
292
293
  calld->~call_data();
293
294
  }
@@ -26,7 +26,7 @@
26
26
  namespace grpc_core {
27
27
 
28
28
  /// A hash table mapping target addresses to authorities.
29
- typedef SliceHashTable<UniquePtr<char>> TargetAuthorityTable;
29
+ typedef SliceHashTable<grpc_core::UniquePtr<char>> TargetAuthorityTable;
30
30
 
31
31
  /// Returns a channel argument containing \a table.
32
32
  grpc_arg CreateTargetAuthorityTableChannelArg(TargetAuthorityTable* table);
@@ -59,14 +59,13 @@ static const char base64_url_safe_chars[] =
59
59
  char* grpc_base64_encode(const void* vdata, size_t data_size, int url_safe,
60
60
  int multiline) {
61
61
  size_t result_projected_size =
62
- grpc_base64_estimate_encoded_size(data_size, url_safe, multiline);
62
+ grpc_base64_estimate_encoded_size(data_size, multiline);
63
63
  char* result = static_cast<char*>(gpr_malloc(result_projected_size));
64
64
  grpc_base64_encode_core(result, vdata, data_size, url_safe, multiline);
65
65
  return result;
66
66
  }
67
67
 
68
- size_t grpc_base64_estimate_encoded_size(size_t data_size, int url_safe,
69
- int multiline) {
68
+ size_t grpc_base64_estimate_encoded_size(size_t data_size, int multiline) {
70
69
  size_t result_projected_size =
71
70
  4 * ((data_size + 3) / 3) +
72
71
  2 * (multiline ? (data_size / (3 * GRPC_BASE64_MULTILINE_NUM_BLOCKS))
@@ -81,7 +80,7 @@ void grpc_base64_encode_core(char* result, const void* vdata, size_t data_size,
81
80
  const char* base64_chars =
82
81
  url_safe ? base64_url_safe_chars : base64_url_unsafe_chars;
83
82
  const size_t result_projected_size =
84
- grpc_base64_estimate_encoded_size(data_size, url_safe, multiline);
83
+ grpc_base64_estimate_encoded_size(data_size, multiline);
85
84
 
86
85
  char* current = result;
87
86
  size_t num_blocks = 0;
@@ -31,8 +31,7 @@ char* grpc_base64_encode(const void* data, size_t data_size, int url_safe,
31
31
 
32
32
  /* estimate the upper bound on size of base64 encoded data. The actual size
33
33
  * is guaranteed to be less than or equal to the size returned here. */
34
- size_t grpc_base64_estimate_encoded_size(size_t data_size, int url_safe,
35
- int multiline);
34
+ size_t grpc_base64_estimate_encoded_size(size_t data_size, int multiline);
36
35
 
37
36
  /* Encodes data using base64 and write it to memory pointed to by result. It is
38
37
  * the caller's responsibility to allocate enough memory in |result| to fit the
@@ -73,9 +73,7 @@ static_assert(std::is_trivially_destructible<decltype(kNoopRefcount)>::value,
73
73
  with the user provided data pointer & destroy function */
74
74
  class NewSliceRefcount {
75
75
  public:
76
- static void Destroy(void* arg) {
77
- Delete(static_cast<NewSliceRefcount*>(arg));
78
- }
76
+ static void Destroy(void* arg) { delete static_cast<NewSliceRefcount*>(arg); }
79
77
 
80
78
  NewSliceRefcount(void (*destroy)(void*), void* user_data)
81
79
  : base_(grpc_slice_refcount::Type::REGULAR, &refs_, Destroy, this,
@@ -116,8 +114,7 @@ grpc_slice grpc_slice_new_with_user_data(void* p, size_t len,
116
114
  void* user_data) {
117
115
  grpc_slice slice;
118
116
  slice.refcount =
119
- grpc_core::New<grpc_core::NewSliceRefcount>(destroy, user_data)
120
- ->base_refcount();
117
+ (new grpc_core::NewSliceRefcount(destroy, user_data))->base_refcount();
121
118
  slice.data.refcounted.bytes = static_cast<uint8_t*>(p);
122
119
  slice.data.refcounted.length = len;
123
120
  return slice;
@@ -134,7 +131,7 @@ namespace grpc_core {
134
131
  class NewWithLenSliceRefcount {
135
132
  public:
136
133
  static void Destroy(void* arg) {
137
- Delete(static_cast<NewWithLenSliceRefcount*>(arg));
134
+ delete static_cast<NewWithLenSliceRefcount*>(arg);
138
135
  }
139
136
 
140
137
  NewWithLenSliceRefcount(void (*destroy)(void*, size_t), void* user_data,
@@ -168,7 +165,7 @@ class MovedStringSliceRefCount {
168
165
 
169
166
  private:
170
167
  static void Destroy(void* arg) {
171
- Delete(static_cast<MovedStringSliceRefCount*>(arg));
168
+ delete static_cast<MovedStringSliceRefCount*>(arg);
172
169
  }
173
170
 
174
171
  grpc_slice_refcount base_;
@@ -181,9 +178,8 @@ class MovedStringSliceRefCount {
181
178
  grpc_slice grpc_slice_new_with_len(void* p, size_t len,
182
179
  void (*destroy)(void*, size_t)) {
183
180
  grpc_slice slice;
184
- slice.refcount =
185
- grpc_core::New<grpc_core::NewWithLenSliceRefcount>(destroy, p, len)
186
- ->base_refcount();
181
+ slice.refcount = (new grpc_core::NewWithLenSliceRefcount(destroy, p, len))
182
+ ->base_refcount();
187
183
  slice.data.refcounted.bytes = static_cast<uint8_t*>(p);
188
184
  slice.data.refcounted.length = len;
189
185
  return slice;
@@ -223,9 +219,8 @@ grpc_slice grpc_slice_from_moved_buffer(grpc_core::UniquePtr<char> p,
223
219
  slice.data.inlined.length = len;
224
220
  memcpy(GRPC_SLICE_START_PTR(slice), ptr, len);
225
221
  } else {
226
- slice.refcount =
227
- grpc_core::New<grpc_core::MovedStringSliceRefCount>(std::move(p))
228
- ->base_refcount();
222
+ slice.refcount = (new grpc_core::MovedStringSliceRefCount(std::move(p)))
223
+ ->base_refcount();
229
224
  slice.data.refcounted.bytes = ptr;
230
225
  slice.data.refcounted.length = len;
231
226
  }
@@ -511,7 +511,7 @@ void grpc_call_internal_unref(grpc_call* c REF_ARG) {
511
511
  GRPC_CALL_STACK_UNREF(CALL_STACK_FROM_CALL(c), REF_REASON);
512
512
  }
513
513
 
514
- static void release_call(void* call, grpc_error* error) {
514
+ static void release_call(void* call, grpc_error* /*error*/) {
515
515
  grpc_call* c = static_cast<grpc_call*>(call);
516
516
  grpc_channel* channel = c->channel;
517
517
  grpc_core::Arena* arena = c->arena;
@@ -520,7 +520,7 @@ static void release_call(void* call, grpc_error* error) {
520
520
  GRPC_CHANNEL_INTERNAL_UNREF(channel, "call");
521
521
  }
522
522
 
523
- static void destroy_call(void* call, grpc_error* error) {
523
+ static void destroy_call(void* call, grpc_error* /*error*/) {
524
524
  GPR_TIMER_SCOPE("destroy_call", 0);
525
525
  size_t i;
526
526
  int ii;
@@ -617,7 +617,7 @@ grpc_call_error grpc_call_cancel(grpc_call* call, void* reserved) {
617
617
 
618
618
  // This is called via the call combiner to start sending a batch down
619
619
  // the filter stack.
620
- static void execute_batch_in_call_combiner(void* arg, grpc_error* ignored) {
620
+ static void execute_batch_in_call_combiner(void* arg, grpc_error* /*ignored*/) {
621
621
  GPR_TIMER_SCOPE("execute_batch_in_call_combiner", 0);
622
622
  grpc_transport_stream_op_batch* batch =
623
623
  static_cast<grpc_transport_stream_op_batch*>(arg);
@@ -678,7 +678,7 @@ typedef struct {
678
678
 
679
679
  // The on_complete callback used when sending a cancel_stream batch down
680
680
  // the filter stack. Yields the call combiner when the batch is done.
681
- static void done_termination(void* arg, grpc_error* error) {
681
+ static void done_termination(void* arg, grpc_error* /*error*/) {
682
682
  cancel_state* state = static_cast<cancel_state*>(arg);
683
683
  GRPC_CALL_COMBINER_STOP(&state->call->call_combiner,
684
684
  "on_complete for cancel_stream op");
@@ -805,9 +805,10 @@ uint32_t grpc_call_test_only_get_message_flags(grpc_call* call) {
805
805
  return flags;
806
806
  }
807
807
 
808
- static void destroy_encodings_accepted_by_peer(void* p) { return; }
808
+ static void destroy_encodings_accepted_by_peer(void* /*p*/) { return; }
809
809
 
810
- static void set_encodings_accepted_by_peer(grpc_call* call, grpc_mdelem mdel,
810
+ static void set_encodings_accepted_by_peer(grpc_call* /*call*/,
811
+ grpc_mdelem mdel,
811
812
  uint32_t* encodings_accepted_by_peer,
812
813
  bool stream_encoding) {
813
814
  size_t i;
@@ -1152,7 +1153,7 @@ static batch_control* reuse_or_allocate_batch_control(grpc_call* call,
1152
1153
  }
1153
1154
 
1154
1155
  static void finish_batch_completion(void* user_data,
1155
- grpc_cq_completion* storage) {
1156
+ grpc_cq_completion* /*storage*/) {
1156
1157
  batch_control* bctl = static_cast<batch_control*>(user_data);
1157
1158
  grpc_call* call = bctl->call;
1158
1159
  bctl->call = nullptr;
@@ -1223,12 +1224,9 @@ static void post_batch_completion(batch_control* bctl) {
1223
1224
  if (bctl->completion_data.notify_tag.is_closure) {
1224
1225
  /* unrefs error */
1225
1226
  bctl->call = nullptr;
1226
- /* This closure may be meant to be run within some combiner. Since we aren't
1227
- * running in any combiner here, we need to use GRPC_CLOSURE_SCHED instead
1228
- * of GRPC_CLOSURE_RUN.
1229
- */
1230
- GRPC_CLOSURE_SCHED((grpc_closure*)bctl->completion_data.notify_tag.tag,
1231
- error);
1227
+ grpc_core::Closure::Run(DEBUG_LOCATION,
1228
+ (grpc_closure*)bctl->completion_data.notify_tag.tag,
1229
+ error);
1232
1230
  GRPC_CALL_INTERNAL_UNREF(call, "completion");
1233
1231
  } else {
1234
1232
  /* unrefs error */
@@ -1514,7 +1512,8 @@ static void receiving_initial_metadata_ready(void* bctlp, grpc_error* error) {
1514
1512
  }
1515
1513
  }
1516
1514
  if (saved_rsr_closure != nullptr) {
1517
- GRPC_CLOSURE_RUN(saved_rsr_closure, GRPC_ERROR_REF(error));
1515
+ grpc_core::Closure::Run(DEBUG_LOCATION, saved_rsr_closure,
1516
+ GRPC_ERROR_REF(error));
1518
1517
  }
1519
1518
 
1520
1519
  finish_batch_step(bctl);
@@ -1545,7 +1544,7 @@ static void finish_batch(void* bctlp, grpc_error* error) {
1545
1544
  finish_batch_step(bctl);
1546
1545
  }
1547
1546
 
1548
- static void free_no_op_completion(void* p, grpc_cq_completion* completion) {
1547
+ static void free_no_op_completion(void* /*p*/, grpc_cq_completion* completion) {
1549
1548
  gpr_free(completion);
1550
1549
  }
1551
1550
 
@@ -1563,7 +1562,7 @@ static grpc_call_error call_start_batch(grpc_call* call, const grpc_op* ops,
1563
1562
  grpc_transport_stream_op_batch* stream_op;
1564
1563
  grpc_transport_stream_op_batch_payload* stream_op_payload;
1565
1564
 
1566
- GRPC_CALL_LOG_BATCH(GPR_INFO, call, ops, nops, notify_tag);
1565
+ GRPC_CALL_LOG_BATCH(GPR_INFO, ops, nops);
1567
1566
 
1568
1567
  if (nops == 0) {
1569
1568
  if (!is_notify_tag_closure) {
@@ -1573,7 +1572,8 @@ static grpc_call_error call_start_batch(grpc_call* call, const grpc_op* ops,
1573
1572
  static_cast<grpc_cq_completion*>(
1574
1573
  gpr_malloc(sizeof(grpc_cq_completion))));
1575
1574
  } else {
1576
- GRPC_CLOSURE_SCHED((grpc_closure*)notify_tag, GRPC_ERROR_NONE);
1575
+ grpc_core::Closure::Run(DEBUG_LOCATION, (grpc_closure*)notify_tag,
1576
+ GRPC_ERROR_NONE);
1577
1577
  }
1578
1578
  error = GRPC_CALL_OK;
1579
1579
  goto done;
@@ -1748,8 +1748,8 @@ static grpc_call_error call_start_batch(grpc_call* call, const grpc_op* ops,
1748
1748
  call->sent_final_op = true;
1749
1749
  GPR_ASSERT(call->send_extra_metadata_count == 0);
1750
1750
  call->send_extra_metadata_count = 1;
1751
- call->send_extra_metadata[0].md = grpc_channel_get_reffed_status_elem(
1752
- call->channel, op->data.send_status_from_server.status);
1751
+ call->send_extra_metadata[0].md = grpc_get_reffed_status_elem(
1752
+ op->data.send_status_from_server.status);
1753
1753
  grpc_error* status_error =
1754
1754
  op->data.send_status_from_server.status == GRPC_STATUS_OK
1755
1755
  ? GRPC_ERROR_NONE
@@ -90,8 +90,7 @@ void grpc_call_cancel_internal(grpc_call* call);
90
90
  grpc_call* grpc_call_from_top_element(grpc_call_element* surface_element);
91
91
 
92
92
  void grpc_call_log_batch(const char* file, int line, gpr_log_severity severity,
93
- grpc_call* call, const grpc_op* ops, size_t nops,
94
- void* tag);
93
+ const grpc_op* ops, size_t nops);
95
94
 
96
95
  /* Set a context pointer.
97
96
  No thread safety guarantees are made wrt this value. */
@@ -101,11 +100,11 @@ void grpc_call_context_set(grpc_call* call, grpc_context_index elem,
101
100
  /* Get a context pointer. */
102
101
  void* grpc_call_context_get(grpc_call* call, grpc_context_index elem);
103
102
 
104
- #define GRPC_CALL_LOG_BATCH(sev, call, ops, nops, tag) \
105
- do { \
106
- if (GRPC_TRACE_FLAG_ENABLED(grpc_api_trace)) { \
107
- grpc_call_log_batch(sev, call, ops, nops, tag); \
108
- } \
103
+ #define GRPC_CALL_LOG_BATCH(sev, ops, nops) \
104
+ do { \
105
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_api_trace)) { \
106
+ grpc_call_log_batch(sev, ops, nops); \
107
+ } \
109
108
  } while (0)
110
109
 
111
110
  uint8_t grpc_call_is_client(grpc_call* call);