osmo-mgw[master]: mgcp: move port/timeslot calculator to separate header

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Fri Oct 13 13:34:13 UTC 2017


Patch Set 1: Code-Review-1

(1 comment)

Please clarify, does the new MGW need this at all? Is this only for bsc-nat? So far I thought the new MGW allocates ports as it sees fit and communicates the right port numbers back to the client(s), hence these functions would not be needed.

Please clarify, why is it not possible to include mgcp.h when mgcp_client.h is already included? They should both be completely separate now, besides mgcp_common.h.

https://gerrit.osmocom.org/#/c/4237/1/include/osmocom/mgcp/mgcp_calc.h
File include/osmocom/mgcp/mgcp_calc.h:

Line 1: /* Helpers to calculate ports and endpoints */
This header can be used by both libraries without linking conflicts because it only contains static inline functions. However, upon debian packaging of the -dev packages, this will hit a conflict: both the libosmo-mgcp-dev and libosmo-mgcp-client-dev will need to install this header file and hence they will conflict.

With mgcp_common.h, this problem has been resolved by copying the file from mgcp/ to mgcp_client/ at build time (which avoids code dup), and by including each separate copy in the debian packages, so that one ends up in include/osmocom/mgcp and the other in include/osmocom/mgcp_client.

The easiest (IMHO best) would be if you simply added these functions to mgcp/mgcp_common.h instead of a new header file.

Otherwise copy this header like mgcp_common.h and make sure to add it to debian/ as well.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8a553e863701d3bafa7b8dc17a503455c303546e
Gerrit-PatchSet: 1
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-HasComments: Yes


More information about the gerrit-log mailing list