[Asterisk-code-review] res/res_stasis: Fixed wrong StasisEnd timestamp (...asterisk[13])

Kevin Harwell asteriskteam at digium.com
Wed Mar 13 18:22:45 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 1:

(2 comments)

StasisStart gets its timestamp from the start_message_blob, which just obtains it from the current system time and passes it in. Which should still make it unique/different from other events (as I don't see any other event referencing the start_message_blob).

https://gerrit.asterisk.org/#/c/11133/1/res/res_stasis.c 
File res/res_stasis.c:

https://gerrit.asterisk.org/#/c/11133/1/res/res_stasis.c@128 
PS1, Line 128: 	msg = ast_json_pack("{s: s, s: O, s: o}",
Bumping the ref here makes sense to me, but (as Josh pointed out) this is now doing something similar to StasisStart however it does not bump the ref. Seems like it would cause a double free potentially unless jansson guards against ref counts below zero or NULL things out. Anyway just thought I'd mention it as I'm not sure what's 100% correct here.


https://gerrit.asterisk.org/#/c/11133/1/res/res_stasis.c@130 
PS1, Line 130: 		"timestamp", ast_json_object_get(payload->blob, "timestamp"),
The blob here gets created in "app_send_end_msg" correct? If so I am not seeing where the timestamp gets created there and set, so this will always be NULL.



-- 
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: 1
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-Comment-Date: Wed, 13 Mar 2019 23:22:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190313/4a350540/attachment.html>


More information about the asterisk-code-review mailing list