-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibevent-2.0.4-alpha-get-request-reply.patch
36 lines (34 loc) · 1.26 KB
/
libevent-2.0.4-alpha-get-request-reply.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
diff -dur libevent-2.0.4-alpha-new-with-arg/evrpc.c libevent-2.0.4-alpha-get-request-reply/evrpc.c
--- libevent-2.0.4-alpha-new-with-arg/evrpc.c 2010-03-27 20:12:29.000000000 +0800
+++ libevent-2.0.4-alpha-get-request-reply/evrpc.c 2010-03-27 19:19:19.000000000 +0800
@@ -444,6 +444,18 @@
return;
}
+void *
+evrpc_get_request(struct evrpc_req_generic *req)
+{
+ return req->request;
+}
+
+void *
+evrpc_get_reply(struct evrpc_req_generic *req)
+{
+ return req->reply;
+}
+
static void
evrpc_request_done_closure(void *arg, enum EVRPC_HOOK_RESULT hook_res)
{
diff -dur libevent-2.0.4-alpha-new-with-arg/include/event2/rpc.h libevent-2.0.4-alpha-get-request-reply/include/event2/rpc.h
--- libevent-2.0.4-alpha-new-with-arg/include/event2/rpc.h 2010-03-27 20:12:29.000000000 +0800
+++ libevent-2.0.4-alpha-get-request-reply/include/event2/rpc.h 2010-03-27 20:13:57.000000000 +0800
@@ -259,6 +259,10 @@
/** completes the server response to an rpc request */
void evrpc_request_done(struct evrpc_req_generic *req);
+/** accessors for request and reply */
+void *evrpc_get_request(struct evrpc_req_generic *req);
+void *evrpc_get_reply(struct evrpc_req_generic *req);
+
/** Creates the reply to an RPC request
*
* EVRPC_REQUEST_DONE is used to answer a request; the reply is expected