Attention is currently required from: neels, msuraev. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/29087 )
Change subject: SIGTRAN: add function to check connection existence ......................................................................
Patch Set 12:
(2 comments)
File examples/sccp_test_vty.c:
https://gerrit.osmocom.org/c/libosmo-sccp/+/29087/comment/c3633442_e7d22e25 PS8, Line 44: int conn_id = atoi(argv[0]), ret;
please declare 'int ret;' on a separate line […]
I agree with Neels that doing "int a = ..., rc;" hides definition of rc. I find it harder to read than if it was on a separate line. If not a separate line, "int rc, a = ...;" is an acceptable solution too. Regarding ret vs rc - I don't care.
File src/sccp_scoc.c:
https://gerrit.osmocom.org/c/libosmo-sccp/+/29087/comment/501d0b7f_b6c20a69 PS12, Line 459: osmo_sccp_conn_id_exists So this function basically converts the result of conn_find_by_id() to boolean. Not sure if it's really beneficial to add a new symbol, you could simply expose conn_find_by_id() and call it directly when you need to check connection existence.