mirror of
https://git.openafs.org/openafs.git
synced 2025-01-22 17:00:15 +00:00
rx: add post RPC procedure capability
Add the ability to specify a procedure that will be called after the end of each RPC for a service. This is similar to the existing afterProc, except that it gets called after the RPC has ended (after EndCall). rx_SetPostProc and rx_GetPostProc are provided to set and retrieve a postProc for a specified service. Change-Id: I52e70323c5d35c9c0d70d9b9bbb05ff56a6edcad Reviewed-on: http://gerrit.openafs.org/5529 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
This commit is contained in:
parent
2fd66404d9
commit
5587bbfc0b
@ -1851,6 +1851,10 @@ rxi_ServerProc(int threadID, struct rx_call *newcall, osi_socket * socketp)
|
||||
(*tservice->afterProc) (call, code);
|
||||
|
||||
rx_EndCall(call, code);
|
||||
|
||||
if (tservice->postProc)
|
||||
(*tservice->postProc) (code);
|
||||
|
||||
if (rx_stats_active) {
|
||||
MUTEX_ENTER(&rx_stats_mutex);
|
||||
rxi_nCalls++;
|
||||
|
@ -152,6 +152,8 @@ rx_IsLoopbackAddr(afs_uint32 addr)
|
||||
#define rx_SetBeforeProc(service,proc) ((service)->beforeProc = (proc))
|
||||
#define rx_GetAfterProc(service) ((service)->afterProc)
|
||||
#define rx_GetBeforeProc(service) ((service)->beforeProc)
|
||||
#define rx_SetPostProc(service,proc) ((service)->postProc = (proc))
|
||||
#define rx_GetPostProc(service) ((service)->postProc)
|
||||
|
||||
/* Define a procedure to be called when a server connection is created */
|
||||
#define rx_SetNewConnProc(service, proc) ((service)->newConnProc = (proc))
|
||||
@ -315,6 +317,7 @@ struct rx_service {
|
||||
void (*newConnProc) (struct rx_connection * tcon); /* Routine to call when a server connection is created */
|
||||
void (*beforeProc) (struct rx_call * acall); /* routine to call before a call is executed */
|
||||
void (*afterProc) (struct rx_call * acall, afs_int32 code); /* routine to call after a call is executed */
|
||||
void (*postProc) (afs_int32 code); /* routine to call after the call has ended */
|
||||
u_short maxProcs; /* Maximum procs to be used for this service */
|
||||
u_short minProcs; /* Minimum # of requests guaranteed executable simultaneously */
|
||||
u_short connDeadTime; /* Seconds until a client of this service will be declared dead, if it is not responding */
|
||||
|
Loading…
Reference in New Issue
Block a user