[asterisk-dev] jpeeler: branch 1.0 r465 - in /branches/1.0: menuselect.c menuselect.h

Jeff Peeler jpeeler at digium.com
Mon Feb 2 11:48:45 CST 2009


----- "Russell Bryant" <russell at digium.com> wrote:

> On Jan 30, 2009, at 5:37 PM, SVN commits to the Digium repositories  
> wrote:
> 
> > Author: jpeeler
> > Date: Fri Jan 30 17:37:29 2009
> > New Revision: 465
> >
> > URL: http://svn.digium.com/svn-view/menuselect?view=rev&rev=465
> > Log:
> > (closes issue #14137)
> > Reported by: jnemeth
> >
> > Add the string "asterisk.makeopts" to search for valid makeopts  
> > configuration files in the arguments provided to menuselect.  
> > Previously, the existing_config flag was not getting set causing the
>  
> > defaults to load when a menuselect.makeopts file was not present,  
> > even though a valid /etc/asterisk.makeopts or ~/.asterisk.makeopts 
> 
> > file existed. Technically the use of strstr is going to allow any  
> > valid file with the string "asterisk.makeopts" in it to work. I  
> > believe this is best though since it avoids any hardcoded paths and 
> 
> > the encouraged method of invoking menuselect is through use of the 
> 
> > menuselect makefile targets.
> >
> >
> > Modified:
> >    branches/1.0/menuselect.c
> >    branches/1.0/menuselect.h
> >
> > Modified: branches/1.0/menuselect.c
> > URL:
> http://svn.digium.com/svn-view/menuselect/branches/1.0/menuselect.c?view=diff&rev=465&r1=464&r2=465
> > = 
> > = 
> > = 
> > = 
> > = 
> > = 
> > = 
> > = 
> >
> ======================================================================
> > --- branches/1.0/menuselect.c (original)
> > +++ branches/1.0/menuselect.c Fri Jan 30 17:37:29 2009
> > @@ -1237,8 +1237,9 @@
> > 			check_deps = 1;
> > 		else {
> > 			res = parse_existing_config(argv[x]);
> > -			if (!res && !strcasecmp(argv[x], OUTPUT_MAKEOPTS_DEFAULT))
> > +			if (!res && (!strcasecmp(argv[x], OUTPUT_MAKEOPTS_DEFAULT) ||  
> > strstr(argv[x], SAVED_MAKEOPTS))) {
> > 				existing_config = 1;
> > +			}
> > 			res = 0;
> > 		}
> > 	}
> >
> > Modified: branches/1.0/menuselect.h
> > URL:
> http://svn.digium.com/svn-view/menuselect/branches/1.0/menuselect.h?view=diff&rev=465&r1=464&r2=465
> > = 
> > = 
> > = 
> > = 
> > = 
> > = 
> > = 
> > = 
> >
> ======================================================================
> > --- branches/1.0/menuselect.h (original)
> > +++ branches/1.0/menuselect.h Fri Jan 30 17:37:29 2009
> > @@ -30,6 +30,7 @@
> >
> > #define OUTPUT_MAKEOPTS_DEFAULT "menuselect.makeopts"
> > #define OUTPUT_MAKEDEPS_DEFAULT "menuselect.makedeps"
> > +#define SAVED_MAKEOPTS          "asterisk.makeopts"
> > #define MENUSELECT_DEPS         "build_tools/menuselect-deps"
> 
> 
> This change is Asterisk specific.  None of the other code in  
> menuselect is specific to a project.  For example, menuselect is also 
> 
> used for DAHDI.  If the flag needs to be set if _any_ existing config 
> 
> exists, then I would take out the string comparisons completely, and 
> 
> just check 'res'.
> 
> Also, take a look at the commit message guidelines information.  The 
> 
> special tags should be at the bottom of the commit message.
> 
> http://www.asterisk.org/doxygen/trunk/CommitMessages.html

I didn't even think about checking DAHDI before making this change. Fixed in r467.

-- 
Jeff Peeler
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at www.digium.com & www.asterisk.org



More information about the asterisk-dev mailing list