[PATCH] libosmo-netif[master]: osmux: Pass circuit to _batch_del_circuit() and use it from ...
Review at https://gerrit.osmocom.org/119 osmux: Pass circuit to _batch_del_circuit() and use it from _xfrm_input_fini() Change-Id: If224980123d4a369133499ab7b577d02511f4055 Ticket: OS#1733 --- M src/osmux.c 1 file changed, 8 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/19/119/1 diff --git a/src/osmux.c b/src/osmux.c index 8025d5d..44b4b96 100644 --- a/src/osmux.c +++ b/src/osmux.c @@ -533,14 +533,8 @@ return circuit; } -static void osmux_batch_del_circuit(struct osmux_batch *batch, int ccid) +static void osmux_batch_del_circuit(struct osmux_batch *batch, struct osmux_circuit *circuit) { - struct osmux_circuit *circuit; - - circuit = osmux_batch_find_circuit(batch, ccid); - if (circuit == NULL) - return; - if (circuit->dummy) batch->ndummy--; llist_del(&circuit->head); @@ -713,8 +707,13 @@ void osmux_xfrm_input_close_circuit(struct osmux_in_handle *h, int ccid) { struct osmux_batch *batch = (struct osmux_batch *)h->internal_data; + struct osmux_circuit *circuit; - osmux_batch_del_circuit(batch, ccid); + circuit = osmux_batch_find_circuit(batch, ccid); + if (circuit == NULL) + return; + + osmux_batch_del_circuit(batch, circuit); } void osmux_xfrm_input_fini(struct osmux_in_handle *h) @@ -723,8 +722,7 @@ struct osmux_circuit *circuit, *next; llist_for_each_entry_safe(circuit, next, &batch->circuit_list, head) { - llist_del(&circuit->head); - talloc_free(circuit); + osmux_batch_del_circuit(batch, circuit); } osmo_timer_del(&batch->timer); talloc_free(batch); -- To view, visit https://gerrit.osmocom.org/119 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If224980123d4a369133499ab7b577d02511f4055 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: daniel <dwillmann@sysmocom.de>
Patch Set 1: The Jenkins Builder error seems bogus: http://jenkins.osmocom.org/jenkins/job/libosmo-netif-gerrit/8/label=linux_am... Not sure what that issue is -- To view, visit https://gerrit.osmocom.org/119 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If224980123d4a369133499ab7b577d02511f4055 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: daniel <dwillmann@sysmocom.de> Gerrit-Reviewer: Holger Freyther <holger@freyther.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann@sysmocom.de> Gerrit-HasComments: No
Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/119/1/src/osmux.c File src/osmux.c: Line 724: llist_for_each_entry_safe(circuit, next, &batch->circuit_list, head) { coding style, remove the curly braces please. -- To view, visit https://gerrit.osmocom.org/119 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If224980123d4a369133499ab7b577d02511f4055 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: daniel <dwillmann@sysmocom.de> Gerrit-Reviewer: Holger Freyther <holger@freyther.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann@sysmocom.de> Gerrit-HasComments: Yes
Patch Set 1: Code-Review-1 -- To view, visit https://gerrit.osmocom.org/119 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If224980123d4a369133499ab7b577d02511f4055 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: daniel <dwillmann@sysmocom.de> Gerrit-Reviewer: Holger Freyther <holger@freyther.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann@sysmocom.de> Gerrit-HasComments: No
Hello Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/119 to look at the new patch set (#2). osmux: Pass circuit to _batch_del_circuit() and use it from _xfrm_input_fini() Change-Id: If224980123d4a369133499ab7b577d02511f4055 Ticket: OS#1733 --- M src/osmux.c 1 file changed, 10 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/19/119/2 diff --git a/src/osmux.c b/src/osmux.c index 8025d5d..1f5bbe2 100644 --- a/src/osmux.c +++ b/src/osmux.c @@ -533,14 +533,8 @@ return circuit; } -static void osmux_batch_del_circuit(struct osmux_batch *batch, int ccid) +static void osmux_batch_del_circuit(struct osmux_batch *batch, struct osmux_circuit *circuit) { - struct osmux_circuit *circuit; - - circuit = osmux_batch_find_circuit(batch, ccid); - if (circuit == NULL) - return; - if (circuit->dummy) batch->ndummy--; llist_del(&circuit->head); @@ -713,8 +707,13 @@ void osmux_xfrm_input_close_circuit(struct osmux_in_handle *h, int ccid) { struct osmux_batch *batch = (struct osmux_batch *)h->internal_data; + struct osmux_circuit *circuit; - osmux_batch_del_circuit(batch, ccid); + circuit = osmux_batch_find_circuit(batch, ccid); + if (circuit == NULL) + return; + + osmux_batch_del_circuit(batch, circuit); } void osmux_xfrm_input_fini(struct osmux_in_handle *h) @@ -722,10 +721,9 @@ struct osmux_batch *batch = (struct osmux_batch *)h->internal_data; struct osmux_circuit *circuit, *next; - llist_for_each_entry_safe(circuit, next, &batch->circuit_list, head) { - llist_del(&circuit->head); - talloc_free(circuit); - } + llist_for_each_entry_safe(circuit, next, &batch->circuit_list, head) + osmux_batch_del_circuit(batch, circuit); + osmo_timer_del(&batch->timer); talloc_free(batch); } -- To view, visit https://gerrit.osmocom.org/119 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If224980123d4a369133499ab7b577d02511f4055 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: daniel <dwillmann@sysmocom.de> Gerrit-Reviewer: Holger Freyther <holger@freyther.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann@sysmocom.de>
Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/119 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If224980123d4a369133499ab7b577d02511f4055 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: daniel <dwillmann@sysmocom.de> Gerrit-Reviewer: Holger Freyther <holger@freyther.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann@sysmocom.de> Gerrit-HasComments: No
Holger Freyther has submitted this change and it was merged. Change subject: osmux: Pass circuit to _batch_del_circuit() and use it from _xfrm_input_fini() ...................................................................... osmux: Pass circuit to _batch_del_circuit() and use it from _xfrm_input_fini() Change-Id: If224980123d4a369133499ab7b577d02511f4055 Ticket: OS#1733 Reviewed-on: https://gerrit.osmocom.org/119 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther <holger@freyther.de> --- M src/osmux.c 1 file changed, 10 insertions(+), 12 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/osmux.c b/src/osmux.c index 8025d5d..1f5bbe2 100644 --- a/src/osmux.c +++ b/src/osmux.c @@ -533,14 +533,8 @@ return circuit; } -static void osmux_batch_del_circuit(struct osmux_batch *batch, int ccid) +static void osmux_batch_del_circuit(struct osmux_batch *batch, struct osmux_circuit *circuit) { - struct osmux_circuit *circuit; - - circuit = osmux_batch_find_circuit(batch, ccid); - if (circuit == NULL) - return; - if (circuit->dummy) batch->ndummy--; llist_del(&circuit->head); @@ -713,8 +707,13 @@ void osmux_xfrm_input_close_circuit(struct osmux_in_handle *h, int ccid) { struct osmux_batch *batch = (struct osmux_batch *)h->internal_data; + struct osmux_circuit *circuit; - osmux_batch_del_circuit(batch, ccid); + circuit = osmux_batch_find_circuit(batch, ccid); + if (circuit == NULL) + return; + + osmux_batch_del_circuit(batch, circuit); } void osmux_xfrm_input_fini(struct osmux_in_handle *h) @@ -722,10 +721,9 @@ struct osmux_batch *batch = (struct osmux_batch *)h->internal_data; struct osmux_circuit *circuit, *next; - llist_for_each_entry_safe(circuit, next, &batch->circuit_list, head) { - llist_del(&circuit->head); - talloc_free(circuit); - } + llist_for_each_entry_safe(circuit, next, &batch->circuit_list, head) + osmux_batch_del_circuit(batch, circuit); + osmo_timer_del(&batch->timer); talloc_free(batch); } -- To view, visit https://gerrit.osmocom.org/119 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If224980123d4a369133499ab7b577d02511f4055 Gerrit-PatchSet: 3 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: daniel <dwillmann@sysmocom.de> Gerrit-Reviewer: Holger Freyther <holger@freyther.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann@sysmocom.de>
participants (2)
-
daniel -
Holger Freyther