<p style="white-space: pre-wrap; word-wrap: break-word;">The code needs to be de-duplicated for this to happen.  For example you could create app/voicemail/adsi.c with adsi_* functions, link that into all three modules, do similar moves for other groups of shared code.  I don't really care about de-duplicating the compiled object code for these three modules (they shouldn't be loaded at the same time anyways).  My complaint is that we cannot have 3 copies of the same source code, this would mean that bug fixes would have to be done in 3 places.</p><p style="white-space: pre-wrap; word-wrap: break-word;">We might want to implement an AST_MODULE_INFO `conflicts` field so the module block loading multiple modules.  Currently the 2nd/3rd module will fail to load but only due to duplicate dialplan / AMI stuff.  Need to set load priorities on these to give a deterministic order if someone tries loading all (file system first, odbc next, imap last).</p><p style="white-space: pre-wrap; word-wrap: break-word;">It would be nice to split off odbc/imap modules but I'm not sure it can be done directly from where we are now.  Might be easier to digest if you moved shared code out of app_voicemail.c first / in separate reviews.  Once app_voicemail.c is smaller it might be easier to split the module.  Plus the move of shared code can be done against released versions so this would reduce the diff between branches.</p><p>Patch set 1:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4; color: #000000;">Code-Review -1</span></p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/11416">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/11416">change 11416</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/11416"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ifac3a909680185778c4fb0dbee6e4a7782642059 </div>
<div style="display:none"> Gerrit-Change-Number: 11416 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Christian Savinovich <csavinovich@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 28 May 2019 12:18:06 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-Has-Labels: Yes </div>
<div style="display:none"> Gerrit-MessageType: comment </div>