[padb-devel] [padb] r157 committed - When reducing data in the tree be sure to reduce the data from...

codesite-noreply at google.com codesite-noreply at google.com
Tue Aug 25 17:26:51 BST 2009


Revision: 157
Author: apittman
Date: Tue Aug 25 09:25:50 2009
Log: When reducing data in the tree be sure to reduce the data from
all children, rather than reducing the data from the first child
with the local data and then over-writing it with the next
childs data.

http://code.google.com/p/padb/source/detail?r=157

Modified:
  /trunk/src/padb

=======================================
--- /trunk/src/padb	Tue Aug 25 08:41:34 2009
+++ /trunk/src/padb	Tue Aug 25 09:25:50 2009
@@ -6714,7 +6714,26 @@

      # Copy the network target errors into responce.
      if ( exists $r->{target_data} ) {
-        $handle->{all_replys}->{target_data} = $r->{target_data};
+        if ( exists $handle->{all_replys}->{target_data} ) {
+            foreach my $key ( keys( %{ $r->{target_data} } ) ) {
+                foreach my $value ( keys( %{ $r->{target_data}{$key} } ) )  
{
+                    if (
+                        defined $handle->{all_replys}
+                        ->{target_data}{$key}{$value} )
+                    {
+                        rng_merge(
+                             
$handle->{all_replys}->{target_data}{$key}{$value},
+                            $r->{target_data}{$key}{$value}
+                        );
+                    } else {
+                        $handle->{all_replys}->{target_data}{$key}{$value}  
=
+                          $r->{target_data}{$key}{$value};
+                    }
+                }
+            }
+        } else {
+            $handle->{all_replys}->{target_data} = $r->{target_data};
+        }
      }

      # Merge in local target responces.




More information about the padb-devel mailing list