- replace nested 'if' with '&&'
- fix indentation
- annotate the end brace of some huge block
- remove useless parentheses
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
- handle immediately failures in ast_request();
This removes the need for checking 'chan' multiple times afterwards.
- handle immediately failures in ast_call(), by moving the one-line
case at the top of the 'if' statement;
- use ast_strlen_zero in several places instead of expanding it inline;
- make outstate always a valid pointer;
On passing mark an unclear statement and replace a magic number
with sizeof(tmp).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
- bring the short case at the top of an 'if' statement
(also fix misformatting)
- replace several 'if' with the '?' operator;
- invert the condition on an 'if' to reduce the nesting depth
(reindentation to be done later).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20454 65c4cc65-6c06-0410-ace0-fbb531ad65f3
of their '_full()' version, so we can remove the replicated
implementation and, especially, the risk that they get out of sync.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20389 65c4cc65-6c06-0410-ace0-fbb531ad65f3
- Update lock.h with definitions of ast_channel_lock, ast_channel_unlock and ast_channel_trylock
- Convert some functions (but not all) in channel.c
- Fix some bugs in chan_sip.c
- Convert rest of chan_sip.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
when you have channel locking issues.
(Part of the SIP transfer patch, where I had a *lot* of
channel locking problems)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
(replace nested 'if' with '&&')
I cannot make sense of the first chunk of the proposed patch,
i think the original is correct.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20225 65c4cc65-6c06-0410-ace0-fbb531ad65f3
- localize a variable
- replace three replicas of the same code with a much simpler construct
removing replicated var = var->next;
- use '?' instead of 'if' for an assignment
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20224 65c4cc65-6c06-0410-ace0-fbb531ad65f3
removing replicated var = var->next;
- remove a potential infinite loop and document the problem
- remove useless checks and document why
- mark XXX a possible bug (to be investigated)
- use ast_strlen_zero() instead of expanding it inline
- fix indentation in one place
- replace a nested 'if' with '&&'
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
- fix indentation in a few places
- use a variable to store the 'other' channel, thus removing
the need for some duplicated code;
- use '=' instead of memcpy to copy struct sockaddr_in
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
- add braces around a nested 'if'
- use S_OR and '?' to remove some duplicated function calls;
- replace nested 'if' with &&
- move out a common term in a sequence of 'if'
- add a comment on a potentially dangerous string manipulation
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20196 65c4cc65-6c06-0410-ace0-fbb531ad65f3