dexter has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/18745 )

Change subject: endp: add name generator function for E1 endpoints
......................................................................


Patch Set 2:

(2 comments)

(ensure all messages are sent)

https://gerrit.osmocom.org/c/osmo-mgw/+/18745/1//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/c/osmo-mgw/+/18745/1//COMMIT_MSG@10
PS1, Line 10: correct. Lets add an endpoint name generator function that 
derives a
> Let's
Done


https://gerrit.osmocom.org/c/osmo-mgw/+/18745/1/src/libosmo-mgcp/mgcp_endp.c
File src/libosmo-mgcp/mgcp_endp.c:

https://gerrit.osmocom.org/c/osmo-mgw/+/18745/1/src/libosmo-mgcp/mgcp_endp.c@87
PS1, Line 87:           gen_e1_epname(ep_name_buf, trunk->trunk_nr, index / 14, 
index % 14);
> So you'll be in the end crafting an index value to pass it to 
> mgcp_endp_alloc(), to then uncraft it  […]
When the trunk is allocated all it knows is how many endpoints it has to 
allocate. The index is just for the moment of allocation so that the endp alloc 
function can generate the name.

I had the name generation in mgcp_trunk.c before but I think that the 
"knowlege" on how the name is generated should only be in mgcp_endp.c. We also 
remove complexity, the trunk no longer has to distinguish between the E1 and 
virtual when generating the name.

An alternate solution would be to let mgcp_endp_alloc() allocate all endpoints, 
then the index would not have to passed as a parameter.



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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I70e0c3f96aa3947165f9926666815ee5614c8f57
Gerrit-Change-Number: 18745
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pma...@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pma...@sysmocom.de>
Gerrit-CC: pespin <pes...@sysmocom.de>
Gerrit-Comment-Date: Tue, 09 Jun 2020 17:00:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pes...@sysmocom.de>
Gerrit-MessageType: comment

Reply via email to