Author: coreyfarrell Date: Fri Feb 20 20:51:35 2015 New Revision: 432057 URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=432057 Log: 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/ Modified: trunk/main/asterisk.c Modified: trunk/main/asterisk.c URL: http://svnview.digium.com/svn/asterisk/trunk/main/asterisk.c?view=diff&rev=432057&r1=432056&r2=432057 ============================================================================== --- trunk/main/asterisk.c (original) +++ trunk/main/asterisk.c Fri Feb 20 20:51:35 2015 @@ -1610,15 +1610,14 @@ 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; -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- svn-commits mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/svn-commits