try and fix routing table errors
[spider.git] / perl / Thingy / Hello.pm
index cd31842fd51b3555227ababf540c4c5280d7aa8e..a23bb43877e1a35b4cac86449d3e07987cf4070f 100644 (file)
@@ -90,7 +90,7 @@ sub handle
                                $thing->send($dxchan);
 
                                # broadcast our configuration to the world
-                               $thing = Thingy::Rt->new_lcf;
+                               $thing = Thingy::Rt->new_cf;
                                $thing->broadcast;
                        }
                }
@@ -114,18 +114,17 @@ sub handle
                my $ur = Route::get($user);
                unless ($ur) {
                        my @ref;
-                       my $uref = DXUser->get_current($user) || Thingy::Hello::_upd_user_rec($user, $origin)->put;
+                       my $uref = DXUser->get_current($user) || Thingy::Rt::_upd_user_rec($user, $origin)->put;
                        if ($uref->is_node || $uref->is_aranea) {
                            push @ref, $nref->add($user, $thing->{v}, $thing->{h});
                                push @{$thing->{pc19n}}, @ref if @ref;
+                               do $_->np(1) for @ref;
                        } else {
                                $thing->{pc16n} = $nref;
                                push @ref, $nref->add_user($user, $thing->{h});
                                $thing->{pc16u} = \@ref if @ref;
                        }
-                       $ur = Route::get($user);
                }
-               $ur->np(1);
        } else {
                $nref->version($thing->{v}) unless $nref->version;
                $nref->build($thing->{b}) unless $nref->build;