[Asterisk-code-review] thread safety: Don't use getprotobyname() (asterisk[13])

Sean Bright asteriskteam at digium.com
Mon Mar 20 07:52:03 CDT 2017


Hello George Joseph, Anonymous Coward #1000019,

I'd like you to reexamine a change.  Please visit

    https://gerrit.asterisk.org/5249

to look at the new patch set (#2).

Change subject: thread safety: Don't use getprotobyname()
......................................................................

thread safety: Don't use getprotobyname()

POSIX does not require getprotobyname() to be thread safe and some
implementations use static memory which causes issues when multiple
threads are used.

Further, our usage of it today is just to ultimately get IPPROTO_TCP
for calls to setsockopt(). So instead we just use IPPROTO_TCP directly.

Change-Id: I2e14e58674808f7ce99b2f5e900d0f90d0d8da48
---
M channels/chan_skinny.c
M include/asterisk/network.h
M main/http.c
M main/manager.c
4 files changed, 14 insertions(+), 29 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/49/5249/2
-- 
To view, visit https://gerrit.asterisk.org/5249
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2e14e58674808f7ce99b2f5e900d0f90d0d8da48
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>



More information about the asterisk-code-review mailing list