Change in osmo-hlr[master]: 1/2: refactor: add and use lu_fsm, osmo_gsup_req, osmo_ipa_name

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/.

neels gerrit-no-reply at lists.osmocom.org
Thu Jan 9 14:53:01 UTC 2020


neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16205 )

Change subject: 1/2: refactor: add and use lu_fsm, osmo_gsup_req, osmo_ipa_name
......................................................................


Patch Set 23:

(4 comments)

https://gerrit.osmocom.org/c/osmo-hlr/+/16205/23/src/db.c 
File src/db.c:

https://gerrit.osmocom.org/c/osmo-hlr/+/16205/23/src/db.c@25 
PS23, Line 25: #include <errno.h>
> Non related at all, must go into a separate patch (if needed at all).
dev cruft indeed


https://gerrit.osmocom.org/c/osmo-hlr/+/16205/23/src/gsup_router.c 
File src/gsup_router.c:

https://gerrit.osmocom.org/c/osmo-hlr/+/16205/23/src/gsup_router.c@99 
PS23, Line 99: int gsup_route_add_ipa_name(struct osmo_gsup_conn *conn, const struct osmo_ipa_name *ipa_name)
> and with this type of structs we end up doing like this function, simply adding extra layers.
I find passing a val and separate length around very annoying, and it is also error prone.
It adds extra lines of code and micro-code-dup all over the place.
We should have kept a single struct from the start. I'd rather drop the gsup_route_add() version.


https://gerrit.osmocom.org/c/osmo-hlr/+/16205/23/src/gsupclient/ipa_name.c 
File src/gsupclient/ipa_name.c:

https://gerrit.osmocom.org/c/osmo-hlr/+/16205/23/src/gsupclient/ipa_name.c@90 
PS23, Line 90: 	return osmo_escape_str_c(OTC_SELECT, (char*)ipa_name->val, len);
> So you are forcing the app using the library to enable the otc_select in this case? SHouldn't the fu […]
If I add a _c i'd also have to pass OTC_SELECT everywhere, which would probably be the proper way. That would also imply not being able to return a "" because the returned value always needs to be allocated.

I kind of dislike writing OTC_SELECT in every LOGP(), so I thought I might get away with this more convenient combination; all current GSUP client programs use osmo_select_main_ctx()... Is that acceptable?


https://gerrit.osmocom.org/c/osmo-hlr/+/16205/23/src/hlr.c 
File src/hlr.c:

https://gerrit.osmocom.org/c/osmo-hlr/+/16205/23/src/hlr.c@777 
PS23, Line 777: 		osmo_select_main_ctx(0);
> Is this line change only needed to print stuff more easily?
I think so, yes. It's a valid reason, too :)



-- 
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16205
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: I3a8dff3d4a1cbe10d6ab08257a0138d6b2a082d9
Gerrit-Change-Number: 16205
Gerrit-PatchSet: 23
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-CC: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Thu, 09 Jan 2020 14:53:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin at sysmocom.de>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200109/2a7948c7/attachment.htm>


More information about the gerrit-log mailing list