Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
c6787b26
Commit
c6787b26
authored
9 years ago
by
Robbie Shade
Browse files
Options
Downloads
Patches
Plain Diff
Fix broken udp_server_test, by adding exec_ctx to read_cb
parent
57ee3db0
No related branches found
No related tags found
Loading
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/core/iomgr/udp_server.c
+1
-1
1 addition, 1 deletion
src/core/iomgr/udp_server.c
src/core/iomgr/udp_server.h
+2
-1
2 additions, 1 deletion
src/core/iomgr/udp_server.h
test/core/iomgr/udp_server_test.c
+2
-1
2 additions, 1 deletion
test/core/iomgr/udp_server_test.c
with
5 additions
and
3 deletions
src/core/iomgr/udp_server.c
+
1
−
1
View file @
c6787b26
...
@@ -278,7 +278,7 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *arg, int success) {
...
@@ -278,7 +278,7 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *arg, int success) {
/* Tell the registered callback that data is available to read. */
/* Tell the registered callback that data is available to read. */
GPR_ASSERT
(
sp
->
read_cb
);
GPR_ASSERT
(
sp
->
read_cb
);
sp
->
read_cb
(
sp
->
emfd
,
sp
->
server
->
grpc_server
);
sp
->
read_cb
(
exec_ctx
,
sp
->
emfd
,
sp
->
server
->
grpc_server
);
/* Re-arm the notification event so we get another chance to read. */
/* Re-arm the notification event so we get another chance to read. */
grpc_fd_notify_on_read
(
exec_ctx
,
sp
->
emfd
,
&
sp
->
read_closure
);
grpc_fd_notify_on_read
(
exec_ctx
,
sp
->
emfd
,
&
sp
->
read_closure
);
...
...
This diff is collapsed.
Click to expand it.
src/core/iomgr/udp_server.h
+
2
−
1
View file @
c6787b26
...
@@ -43,7 +43,8 @@ typedef struct grpc_server grpc_server;
...
@@ -43,7 +43,8 @@ typedef struct grpc_server grpc_server;
typedef
struct
grpc_udp_server
grpc_udp_server
;
typedef
struct
grpc_udp_server
grpc_udp_server
;
/* Called when data is available to read from the socket. */
/* Called when data is available to read from the socket. */
typedef
void
(
*
grpc_udp_server_read_cb
)(
grpc_fd
*
emfd
,
grpc_server
*
server
);
typedef
void
(
*
grpc_udp_server_read_cb
)(
grpc_exec_ctx
*
exec_ctx
,
grpc_fd
*
emfd
,
grpc_server
*
server
);
/* Create a server, initially not bound to any ports */
/* Create a server, initially not bound to any ports */
grpc_udp_server
*
grpc_udp_server_create
(
void
);
grpc_udp_server
*
grpc_udp_server_create
(
void
);
...
...
This diff is collapsed.
Click to expand it.
test/core/iomgr/udp_server_test.c
+
2
−
1
View file @
c6787b26
...
@@ -49,7 +49,8 @@ static grpc_pollset g_pollset;
...
@@ -49,7 +49,8 @@ static grpc_pollset g_pollset;
static
int
g_number_of_reads
=
0
;
static
int
g_number_of_reads
=
0
;
static
int
g_number_of_bytes_read
=
0
;
static
int
g_number_of_bytes_read
=
0
;
static
void
on_read
(
grpc_fd
*
emfd
,
grpc_server
*
server
)
{
static
void
on_read
(
grpc_exec_ctx
*
exec_ctx
,
grpc_fd
*
emfd
,
grpc_server
*
server
)
{
char
read_buffer
[
512
];
char
read_buffer
[
512
];
ssize_t
byte_count
;
ssize_t
byte_count
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment