[Asterisk-code-review] res/res_stasis: Fixed wrong StasisEnd timestamp (...asterisk[13])
Kevin Harwell
asteriskteam at digium.com
Fri Mar 15 12:54:37 CDT 2019
Kevin Harwell has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/11133 )
Change subject: res/res_stasis: Fixed wrong StasisEnd timestamp
......................................................................
Patch Set 2: Code-Review-1
(2 comments)
https://gerrit.asterisk.org/#/c/11133/2/res/res_stasis.c
File res/res_stasis.c:
https://gerrit.asterisk.org/#/c/11133/2/res/res_stasis.c@128
PS2, Line 128: msg = ast_json_pack("{s: s, s: o, s: o}",
I believe this is now correct combined with the "ast_json_copy" of the object. However, this should change in the 16 and master branch to use the ref bumping method. See more details on the 16 review.
https://gerrit.asterisk.org/#/c/11133/2/res/res_stasis.c@130
PS2, Line 130: "timestamp", ast_json_copy(ast_json_object_get(payload->blob, "timestamp")),
I still don't think this is getting any kind of timestamp (but could be misreading the code). As I understand it this is attempting to get the timestamp from the "blob". Reading the code the "blob" referenced here is created in "app_send_end_msg":
blob = ast_json_pack("{s: s}", "app", stasis_app_name(app));
"timestamp" is not added at creation, nor appended later from what I can see. The timestamp created in "stasis_message_create_full":
message->timestamp = ast_tvnow();
Is set on the "stasis_message" object itself, and not the "blob" which is being used here. So I believe attempting to get the timestamp from this blob here will always result in NULL.
But I'm assuming you are seeing a timestamp in your testing? So maybe I am misreading the code?
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11133
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I5eb8380fc472f1100535a6bc4983c64767026116
Gerrit-Change-Number: 11133
Gerrit-PatchSet: 2
Gerrit-Owner: sungtae kim <pchero21 at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua C. Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: sungtae kim <pchero21 at gmail.com>
Gerrit-Comment-Date: Fri, 15 Mar 2019 17:54:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190315/76d2b292/attachment.html>
More information about the asterisk-code-review
mailing list