diff options
author | Olle Johansson <oej@edvina.net> | 2006-11-10 12:11:06 +0000 |
---|---|---|
committer | Olle Johansson <oej@edvina.net> | 2006-11-10 12:11:06 +0000 |
commit | 7a3528c4a953371fc8d0a6d0844408b6bb093d03 (patch) | |
tree | 594a1b968896cb87adbb5a73731138e34f6c9f60 /channels/chan_sip.c | |
parent | 74b6314d5008ec50e1e770aa01adbfe31df1dfc8 (diff) |
Small simplification and documentation correction.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47415 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 0fc30e29f..048f80aaf 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -6711,21 +6711,21 @@ static void initreqprep(struct sip_request *req, struct sip_pvt *p, int sipmetho add_header(req, "Remote-Party-ID", p->rpid); } -/*! \brief Build REFER/INVITE/OPTIONS message and transmit it */ +/*! \brief Build REFER/INVITE/OPTIONS message and transmit it + \param init 0 = Prepare request within dialog, 1= prepare request, new branch, 2= prepare new request and new dialog. do_proxy_auth calls this with init!=2 + */ static int transmit_invite(struct sip_pvt *p, int sipmethod, int sdp, int init) { struct sip_request req; req.method = sipmethod; - if (init) { /* Seems like init always is 2 */ - /* Bump branch even on initial requests */ + if (init) {/* Bump branch even on initial requests */ p->branch ^= ast_random(); build_via(p); - if (init > 1) - initreqprep(&req, p, sipmethod); - else - reqprep(&req, p, sipmethod, 0, 1); - } else + } + if (init > 1) + initreqprep(&req, p, sipmethod); + else reqprep(&req, p, sipmethod, 0, 1); if (p->options && p->options->auth) |