openbsc[master]: libmsc: send RP-ACK to MS after ESME sends SMPP DELIVER-SM-RESP

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon May 8 07:24:06 UTC 2017


Patch Set 2: Code-Review-1

(5 comments)

https://gerrit.osmocom.org/#/c/2488/2/openbsc/src/libmsc/smpp_openbsc.c
File openbsc/src/libmsc/smpp_openbsc.c:

Line 464: static void *smpp_cmd_ctx;
if the smpp_cmd are allocated with the esme as context, this one can go.


Line 524: 	smpp_cmd_err(data);
I suppose this has not been tested, as the 'data' is currently pointing to the function, and not to the 'smpp_cmd'.


Line 533: 	cmd = talloc_zero(smpp_cmd_ctx, struct osmo_smpp_cmd);
use 'esme' as talloc_context here, using the hierarchical nature of talloc.


Line 547: 	cmd->response_timer.data = smpp_deliver_sm_cb;
you probably wanted to pass the 'cmd' as data, not a pointer to the function?


https://gerrit.osmocom.org/#/c/2488/2/openbsc/src/libmsc/smpp_smsc.c
File openbsc/src/libmsc/smpp_smsc.c:

Line 907: 	INIT_LLIST_HEAD(&esme->smpp_cmd_list);
we initialize the list of smpp_command here. But what I'm missing is the clean-up.  What if the ESME disconnects before all responses to pending smpp_cmd have been received?

One *might* be able to do this with the hierarchical talloc allocator, if the smpp_cmd are all allocated inside the esme. But they are not, and more importantly, the smpp_cmd is linked into other lists and contains a timer.  So explicit cleanup during esme_destroy is needed.


-- 
To view, visit https://gerrit.osmocom.org/2488
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0d5bd5693fed6d4f4bd2951711c7888712507bfd
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Pablo Neira Ayuso <pablo at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Keith Whyte <keith at rhizomatica.org>
Gerrit-HasComments: Yes



More information about the gerrit-log mailing list