<p>Sylvain Afchain has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/13726">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">add asterisk_id to message generated with channel_blob_to_json<br><br>Currently messages generated by channel_blob_to_json don't contains<br>asterisk_id while other stasis messages do.<br><br>Change-Id: I85fd92c21e7c3465059acda34adf6cfe1777147d<br>---<br>M main/stasis_channels.c<br>1 file changed, 3 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/26/13726/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/main/stasis_channels.c b/main/stasis_channels.c</span><br><span>index 12c8f44..e29e208 100644</span><br><span>--- a/main/stasis_channels.c</span><br><span>+++ b/main/stasis_channels.c</span><br><span>@@ -1345,6 +1345,7 @@</span><br><span> struct ast_json *blob = channel_blob->blob;</span><br><span> struct ast_channel_snapshot *snapshot = channel_blob->snapshot;</span><br><span> const struct timeval *tv = stasis_message_timestamp(message);</span><br><span style="color: hsl(120, 100%, 40%);">+ char eid[20];</span><br><span> int res = 0;</span><br><span> </span><br><span> if (blob == NULL || ast_json_is_null(blob)) {</span><br><span>@@ -1357,6 +1358,8 @@</span><br><span> return NULL;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ res |= ast_json_object_set(to_json, "asterisk_id", ast_json_string_create(</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_eid_to_str(eid, sizeof(eid), &ast_eid_default)));</span><br><span> res |= ast_json_object_set(to_json, "type", ast_json_string_create(type));</span><br><span> res |= ast_json_object_set(to_json, "timestamp",</span><br><span> ast_json_timeval(*tv, NULL));</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/13726">change 13726</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/+/13726"/><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: I85fd92c21e7c3465059acda34adf6cfe1777147d </div>
<div style="display:none"> Gerrit-Change-Number: 13726 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sylvain Afchain <safchain@wazo.io> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>