mirror of
https://github.com/samba-team/samba.git
synced 2025-11-22 16:23:49 +03:00
r7634: move TestSleep functions so that all of them are together
metze
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
3a3025485b
commit
520d5c6732
@@ -118,28 +118,6 @@ static NTSTATUS echo_TestEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *me
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
struct echo_TestSleep_private {
|
||||
struct dcesrv_call_state *dce_call;
|
||||
struct echo_TestSleep *r;
|
||||
};
|
||||
|
||||
static void echo_TestSleep_handler(struct event_context *ev, struct timed_event *te,
|
||||
struct timeval t, void *private)
|
||||
{
|
||||
struct echo_TestSleep_private *p = talloc_get_type(private,
|
||||
struct echo_TestSleep_private);
|
||||
struct echo_TestSleep *r = p->r;
|
||||
NTSTATUS status;
|
||||
|
||||
r->out.result = r->in.seconds;
|
||||
|
||||
status = dcesrv_reply(p->dce_call);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DEBUG(0,("echo_TestSleep_handler: dcesrv_reply() failed - %s\n",
|
||||
nt_errstr(status)));
|
||||
}
|
||||
}
|
||||
|
||||
static NTSTATUS echo_TestSurrounding(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct echo_TestSurrounding *r)
|
||||
{
|
||||
if (!r->in.data) {
|
||||
@@ -163,6 +141,28 @@ static uint16_t echo_TestDoublePointer(struct dcesrv_call_state *dce_call, TALLO
|
||||
return ***r->in.data;
|
||||
}
|
||||
|
||||
struct echo_TestSleep_private {
|
||||
struct dcesrv_call_state *dce_call;
|
||||
struct echo_TestSleep *r;
|
||||
};
|
||||
|
||||
static void echo_TestSleep_handler(struct event_context *ev, struct timed_event *te,
|
||||
struct timeval t, void *private)
|
||||
{
|
||||
struct echo_TestSleep_private *p = talloc_get_type(private,
|
||||
struct echo_TestSleep_private);
|
||||
struct echo_TestSleep *r = p->r;
|
||||
NTSTATUS status;
|
||||
|
||||
r->out.result = r->in.seconds;
|
||||
|
||||
status = dcesrv_reply(p->dce_call);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DEBUG(0,("echo_TestSleep_handler: dcesrv_reply() failed - %s\n",
|
||||
nt_errstr(status)));
|
||||
}
|
||||
}
|
||||
|
||||
static long echo_TestSleep(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct echo_TestSleep *r)
|
||||
{
|
||||
struct echo_TestSleep_private *p;
|
||||
|
||||
Reference in New Issue
Block a user