Commit 98064cb5 authored by Leigh Stoller's avatar Leigh Stoller

Bug fix in Node->Create(); do not modify the widearea_nodeinfo table

if its already set up, as is the case when coming from wanodecreate.
parent 539108cc
......@@ -416,8 +416,16 @@ sub Create($$$$)
my $hostname = $argref->{'hostname'};
my $external = $argref->{'external_node_id'};
my $IP = $argref->{'IP'};
if (!DBQueryWarn("replace into widearea_nodeinfo ".
# Hmm, wanodecreate already does this.
my $wa_result =
DBQueryWarn("select node_id from widearea_nodeinfo ".
"where node_id='$node_id'");
goto bad
if (!$wa_result);
if ($wa_result->numrows == 0 &&
!DBQueryWarn("replace into widearea_nodeinfo ".
" (node_id, contact_uid, contact_idx, hostname," .
" external_node_id, IP) ".
" values ('$node_id', 'nobody', '0', ".
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment