summaryrefslogtreecommitdiff
path: root/main/asterisk.c
diff options
context:
space:
mode:
authorCorey Farrell <git@cfware.com>2015-02-21 02:51:35 +0000
committerCorey Farrell <git@cfware.com>2015-02-21 02:51:35 +0000
commitbb71672a47f7df49d1fab7161deafd7d815be06c (patch)
treee6c394d145c9b57d47270489219d79ce3669cb2c /main/asterisk.c
parentce50fa314a903c4f52a0db406d7a8bc0aefa60cf (diff)
main/asterisk.c: Reverse #if statement in listener() to fix code folding.
listener() opens the same code block in two places (#if and #else). This confuses some folding editors causing it to think that an extra code block was opened. Folding in 'geany' causes all code after listener() to be folded as if it were part of that procedure. ASTERISK-24813 #close Reported by: Corey Farrell Review: https://reviewboard.asterisk.org/r/4435/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@432057 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/asterisk.c')
-rw-r--r--main/asterisk.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/main/asterisk.c b/main/asterisk.c
index 1817eefd8..a466120b1 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -1610,15 +1610,14 @@ static void *listener(void *unused)
if (errno != EINTR)
ast_log(LOG_WARNING, "Accept returned %d: %s\n", s, strerror(errno));
} else {
-#if !defined(SO_PASSCRED)
- {
-#else
+#if defined(SO_PASSCRED)
int sckopt = 1;
/* turn on socket credentials passing. */
if (setsockopt(s, SOL_SOCKET, SO_PASSCRED, &sckopt, sizeof(sckopt)) < 0) {
ast_log(LOG_WARNING, "Unable to turn on socket credentials passing\n");
- } else {
+ } else
#endif
+ {
for (x = 0; x < AST_MAX_CONNECTS; x++) {
if (consoles[x].fd >= 0) {
continue;