<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://reviewboard.asterisk.org/r/3486/">https://reviewboard.asterisk.org/r/3486/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers and Russell Bryant.</div>
<div>By Matt Jordan.</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-22372">ASTERISK-22372</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
Asterisk
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This patch fixes res_corosync such that it works with Asterisk 12. This restores the functionality that was present in previous versions of Asterisk, and ensures compatibility with those versions by restoring the binary message format needed to pass information from/to them.
The following changes were made in the core to support this:
* The event system has been partially restored. All event definition and event types were pulled from Asterisk 11. Previously, we had hoped that this information would live in res_corosync; however, this approach seems to be better for a few reasons:
(1) Theoretically, ast_events can be used by any module as a binary representation of a Stasis message. Given the structure of an ast_event object, that information has to live in the core to be used universally. For example, defining the payload of a device state ast_event in res_corosync could result in an incompatible device state representation in another module.
(2) Much of this representation already lived in the core, and was not easily extensible.
(3) The code already existed. :-)
* Stasis message types now have a message formatter that converts their payload to an ast_event object.
* Stasis message forwarders now handle forwarding to themselves. Previously this would result in an infinite recursive call. Now, this simply creates a new forwarding object with no forwards set up (as it is the thing it is forwarding to). This is advantageous for res_corosync, as returning NULL would also imply an unrecoverable error. Returning a subscription in this case allows for easier handling of message types that are published directly to an aggregate topic that has forwarders.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Verified the following between a cluster with two Asterisk 12 systems and a cluster with an Asterisk 12 system and an Asterisk 11 system:
* Pinging back and forth
* MWI changes (publish and subscribe)
* Device state changes (publish and subscribe)
</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/branches/12/res/res_corosync.c <span style="color: grey">(413035)</span></li>
<li>/branches/12/main/stasis_message.c <span style="color: grey">(413035)</span></li>
<li>/branches/12/main/stasis.c <span style="color: grey">(413035)</span></li>
<li>/branches/12/main/event.c <span style="color: grey">(413035)</span></li>
<li>/branches/12/main/devicestate.c <span style="color: grey">(413035)</span></li>
<li>/branches/12/main/app.c <span style="color: grey">(413035)</span></li>
<li>/branches/12/include/asterisk/stasis.h <span style="color: grey">(413035)</span></li>
<li>/branches/12/include/asterisk/event_defs.h <span style="color: grey">(413035)</span></li>
<li>/branches/12/include/asterisk/event.h <span style="color: grey">(413035)</span></li>
<li>/branches/12/include/asterisk/devicestate.h <span style="color: grey">(413035)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/3486/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>