<p>Sean Bright has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/10300">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">config.c: AST_INCLUDE_GLOB is always defined<br><br>Change-Id: I1bad1a46d7466ddf90d52cc724e997195495226c<br>---<br>M main/config.c<br>1 file changed, 2 insertions(+), 10 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/00/10300/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/main/config.c b/main/config.c</span><br><span>index 12f8739..a8fae05 100644</span><br><span>--- a/main/config.c</span><br><span>+++ b/main/config.c</span><br><span>@@ -45,8 +45,6 @@</span><br><span> #include <math.h>        /* HUGE_VAL */</span><br><span> #include <regex.h></span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#define AST_INCLUDE_GLOB 1</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span> #include "asterisk/config.h"</span><br><span> #include "asterisk/cli.h"</span><br><span> #include "asterisk/lock.h"</span><br><span>@@ -2051,10 +2049,8 @@</span><br><span>   /*! Growable string buffer */</span><br><span>        struct ast_str *comment_buffer = NULL;  /*!< this will be a comment collector.*/</span><br><span>  struct ast_str *lline_buffer = NULL;    /*!< A buffer for stuff behind the ; */</span><br><span style="color: hsl(0, 100%, 40%);">-#ifdef AST_INCLUDE_GLOB</span><br><span>    int glob_ret;</span><br><span>        glob_t globbuf;</span><br><span style="color: hsl(0, 100%, 40%);">-#endif</span><br><span> </span><br><span>    if (cfg) {</span><br><span>           cat = ast_config_get_current_category(cfg);</span><br><span>@@ -2077,7 +2073,7 @@</span><br><span>                  return NULL;</span><br><span>                 }</span><br><span>    }</span><br><span style="color: hsl(0, 100%, 40%);">-#ifdef AST_INCLUDE_GLOB</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>   globbuf.gl_offs = 0;    /* initialize it to silence gcc */</span><br><span>   glob_ret = glob(fn, MY_GLOB_FLAGS, NULL, &globbuf);</span><br><span>      if (glob_ret == GLOB_NOSPACE) {</span><br><span>@@ -2105,7 +2101,7 @@</span><br><span>              }</span><br><span>            for (i=0; i<globbuf.gl_pathc; i++) {</span><br><span>                      ast_copy_string(fn, globbuf.gl_pathv[i], sizeof(fn));</span><br><span style="color: hsl(0, 100%, 40%);">-#endif</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>                        /*</span><br><span>                    * The following is not a loop, but just a convenient way to define a block</span><br><span>                   * (using do { } while(0) ), and be able to exit from it with 'continue'</span><br><span>@@ -2164,9 +2160,7 @@</span><br><span> </span><br><span>                                         if (unchanged) {</span><br><span>                                             AST_LIST_UNLOCK(&cfmtime_head);</span><br><span style="color: hsl(0, 100%, 40%);">-#ifdef AST_INCLUDE_GLOB</span><br><span>                                           globfree(&globbuf);</span><br><span style="color: hsl(0, 100%, 40%);">-#endif</span><br><span>                                                ast_free(comment_buffer);</span><br><span>                                            ast_free(lline_buffer);</span><br><span>                                              return CONFIG_STATUS_FILEUNCHANGED;</span><br><span>@@ -2340,14 +2334,12 @@</span><br><span>                        if (comment) {</span><br><span>                               ast_log(LOG_WARNING,"Unterminated comment detected beginning on line %d\n", nest[comment - 1]);</span><br><span>                    }</span><br><span style="color: hsl(0, 100%, 40%);">-#ifdef AST_INCLUDE_GLOB</span><br><span>                     if (cfg == NULL || cfg == CONFIG_STATUS_FILEUNCHANGED || cfg == CONFIG_STATUS_FILEINVALID) {</span><br><span>                                 break;</span><br><span>                       }</span><br><span>            }</span><br><span>            globfree(&globbuf);</span><br><span>      }</span><br><span style="color: hsl(0, 100%, 40%);">-#endif</span><br><span> </span><br><span>  ast_free(comment_buffer);</span><br><span>    ast_free(lline_buffer);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/10300">change 10300</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/10300"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I1bad1a46d7466ddf90d52cc724e997195495226c </div>
<div style="display:none"> Gerrit-Change-Number: 10300 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>