[Asterisk-code-review] chan console: don't read and write at the same time (asterisk[master])

Richard Mudgett asteriskteam at digium.com
Tue Dec 19 16:01:24 CST 2017


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/7657 )

Change subject: chan_console: don't read and write at the same time
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

https://gerrit.asterisk.org/#/c/7657/1//COMMIT_MSG
Commit Message:

https://gerrit.asterisk.org/#/c/7657/1//COMMIT_MSG@9
PS1, Line 9: It seems that the ALSA backend of PortAudio doesn't know how to to both
s/to to/to/


https://gerrit.asterisk.org/#/c/7657/1/channels/chan_console.c
File channels/chan_console.c:

https://gerrit.asterisk.org/#/c/7657/1/channels/chan_console.c@172
PS1, Line 172: 	ast_mutex_t mutex;
You don't necessarily have to add a lock.  The struct console_pvt is an ao2 object with a lock.  You could use console_pvt_lock()/console_pvt_unlock() instead of managing your own lock.

As it is, the new lock should be initialized in init_pvt() when the pvt struct is created and destroyed in pvt_destructor() which is the ao2 object destructor.



-- 
To view, visit https://gerrit.asterisk.org/7657
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I635eacee45f5413faa18f5a3b606af03b926dacb
Gerrit-Change-Number: 7657
Gerrit-PatchSet: 1
Gerrit-Owner: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Tue, 19 Dec 2017 22:01:24 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171219/861d8f46/attachment-0001.html>


More information about the asterisk-code-review mailing list