mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
r24033: We need to be able to cope with packet_handler calling itself
recursively
(This used to be commit b74797a31e
)
This commit is contained in:
parent
33c57437a4
commit
798fc28a6a
@ -136,15 +136,16 @@ BOOL packet_handler(struct packet_context *ctx,
|
||||
|
||||
SMB_ASSERT(length <= ctx->in.length);
|
||||
|
||||
data.data = ctx->in.data;
|
||||
data.length = length;
|
||||
|
||||
*status = callback(&data, private_data);
|
||||
data = data_blob(ctx->in.data, length);
|
||||
|
||||
memmove(ctx->in.data, ctx->in.data + length,
|
||||
ctx->in.length - length);
|
||||
ctx->in.length -= length;
|
||||
|
||||
*status = callback(&data, private_data);
|
||||
|
||||
data_blob_free(&data);
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user