git.samba.org
/
ira
/
wip.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
packet: make it possible to free the packet_context from the send_callback
[ira/wip.git]
/
source4
/
lib
/
stream
/
packet.c
diff --git
a/source4/lib/stream/packet.c
b/source4/lib/stream/packet.c
index 51021c1fc619da4d906b6ae85b6907cc5ebce104..92fa0e5a548af0d0053f67a5bbfc48494a53dff6 100644
(file)
--- a/
source4/lib/stream/packet.c
+++ b/
source4/lib/stream/packet.c
@@
-469,7
+469,13
@@
_PUBLIC_ void packet_queue_run(struct packet_context *pc)
if (el->nsent == el->blob.length) {
DLIST_REMOVE(pc->send_queue, el);
if (el->send_callback) {
if (el->nsent == el->blob.length) {
DLIST_REMOVE(pc->send_queue, el);
if (el->send_callback) {
+ pc->busy = true;
el->send_callback(el->send_callback_private);
el->send_callback(el->send_callback_private);
+ pc->busy = false;
+ if (pc->destructor_called) {
+ talloc_free(pc);
+ return;
+ }
}
talloc_free(el);
}
}
talloc_free(el);
}