osmith has posted comments on this change. ( https://gerrit.osmocom.org/11290 )
Change subject: vty 'show bts'/'show trx': display IPs and ports ...................................................................... Patch Set 3: (1 comment) Thanks for the review! https://gerrit.osmocom.org/#/c/11290/3/src/osmo-bsc/bsc_vty.c File src/osmo-bsc/bsc_vty.c: https://gerrit.osmocom.org/#/c/11290/3/src/osmo-bsc/bsc_vty.c@293 PS3, Line 293: /*! Dump the IP addresses and ports of the input signal link's timeslot. > I suggest to have a function like e1inp_sign_link_name(const struct > e1inp_sign_link *e1l) which will simply return an empty string or "<none>" if > the e1l is NULL. Done: https://gerrit.osmocom.org/#/c/libosmo-abis/+/11294/ > in therm of API design, I don't think it makes sense to have a separate > 'dump' function here, particularly not one that includes the newline at the > end. This function was closely modeled after "e1isl_dump_vty()" above, which also outputs new lines at the end. With the libosmo-abis patch linked above, the e1isl_dump_vty_tcp() function can be replaced with the following (tested and working): ``` static void e1isl_dump_vty_tcp(struct vty *vty, const struct e1inp_sign_link *e1l) { char *name = e1inp_sign_link_name(e1l); vty_out(vty, "%s%s", name, VTY_NEWLINE); talloc_free(name); } ``` As we still need to free the result of e1inp_sign_link_name(), we save some redundancy if we put these three lines into a function (it gets called two times below). But if you prefer I could instead remove e1isl_dump_vty_tcp() and directly use these three lines where the function would have been called. -- To view, visit https://gerrit.osmocom.org/11290 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I37f020fcdb68cafcdbdb621808483d1dd996354f Gerrit-Change-Number: 11290 Gerrit-PatchSet: 3 Gerrit-Owner: osmith <osm...@sysmocom.de> Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org> Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol <pes...@sysmocom.de> Gerrit-Reviewer: osmith <osm...@sysmocom.de> Gerrit-Comment-Date: Wed, 10 Oct 2018 12:26:00 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No