[Xorp-hackers] [PATCH] rtrmngr fixes

Ben Greear greearb at candelatech.com
Fri Sep 23 09:05:43 PDT 2011


On 09/23/2011 06:48 AM, "Igor Maravić" wrote:
> cleaned_xrl should have reference to it. That reference should be argument of functions XRLDB::check_xrl_syntax and XRLDB::check_xrl_exists.
> Don't know why but it didn't wont to compile with out that fix.
>
> VALIDATE_XRLDB should be replaced with DEBUG_XRLDB
>
> BR
> Igor Maravić
>
> Signed-off-by: Igor Maravić<igorm at etf.rs>
> ---
>
> diff -upNr xorp.old/rtrmgr/template_commands.cc xorp.mpls/rtrmgr/template_commands.cc
> --- xorp.old/rtrmgr/template_commands.cc	2011-03-22 22:08:58.000000000 +0100
> +++ xorp.mpls/rtrmgr/template_commands.cc	2011-09-08 00:30:24.000000000 +0200
> @@ -316,6 +316,7 @@ XrlAction::check_xrl_is_valid(const list
>       // Then we can check it is a valid XRL as known by the XRLdb.
>       //
>       string cleaned_xrl;
> +    const string&  refToCleanedXRL = cleaned_xrl;
>
>       // Trim quotes from around the XRL
>       size_t start = 0;
> @@ -465,13 +466,14 @@ XrlAction::check_xrl_is_valid(const list
>       }
>       debug_msg("XrlAction after cleaning:\n%s\n", cleaned_xrl.c_str());
>
> -    if (xrldb->check_xrl_syntax(cleaned_xrl) == false) {
> +    if (xrldb->check_xrl_syntax(refToCleanedXRL) == false) {
>   	error_msg = c_format("Syntax error in module %s XRL %s: "
>   			     "invalid XRL syntax (check_xrl_syntax failed)",
>   			     module_name.c_str(), cleaned_xrl.c_str());
>   	return false;
>       }
> -    XRLMatchType match = xrldb->check_xrl_exists(cleaned_xrl);
> +
> +    XRLMatchType match = xrldb->check_xrl_exists(refToCleanedXRL);
>       switch (match) {
>       case MATCH_FAIL:
>       case MATCH_RSPEC: {

What system are you compiling on, and can you show the exact
compiler command and errors?

Thanks,
Ben

-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



More information about the Xorp-hackers mailing list