Re: Issue after adding and removing homer nodes

11 views
Skip to first unread message

Alexandr S. Dubovikov

unread,
Aug 15, 2012, 1:51:29 PM8/15/12
to homer-...@googlegroups.com, home...@googlegroups.com

Hello Douglas,

8/15/2012 11:48 AM, Douglas Hubler wrote:
I ran into an issue displaying statistics after adding and removing db
nodes from admin ui.  Essentially stats api would not use the correct
db node and I would get no stats results.  I fixed it so if a node is
not specified we use the first node, not the node with db record id =
0.

I'm asking for a peer review of the code, in case i misunderstood how
$tnode is used in the system

http://code.google.com/p/homer/source/detail?r=d336330faefe3fd7624c37f7843767f5a41ec151

i thought, it was fixed yesterday, if tnode == 0, we use first record in the $mynodes array.

http://code.google.com/p/homer/source/diff?spec=svncd5eb5129e09a5d360d7b56e1638e9954acf2d93&r=cd5eb5129e09a5d360d7b56e1638e9954acf2d93&format=side&path=/webhomer/api/api.php

But your code is much better :-) thanks! Can you put getNode() function to class/index.php ? In this case we can use it to fix the same issue in the cflow and in the pcap export!

Thank you!

Regards,
Alexandr

dhubler

unread,
Aug 16, 2012, 6:31:02 AM8/16/12
to home...@googlegroups.com, homer-...@googlegroups.com

On Wednesday, August 15, 2012 1:51:29 PM UTC-4, Alexandr Dubovikov wrote:
i thought, it was fixed yesterday, if tnode == 0, we use first record in the $mynodes array.


on my system $mynodes keys started with [1] not [0] for looking for $mynodes[$tnode] came up empty.  I was adding and removing records in homer_nodes table so i probably uncovered a setup you would not normally see.   That's why i used array_values($mynodes)[0] just to force first.


 

http://code.google.com/p/homer/source/diff?spec=svncd5eb5129e09a5d360d7b56e1638e9954acf2d93&r=cd5eb5129e09a5d360d7b56e1638e9954acf2d93&format=side&path=/webhomer/api/api.php

But your code is much better :-) thanks! Can you put getNode() function to class/index.php ? In this case we can use it to fix the same issue in the cflow and in the pcap export!

ok
Reply all
Reply to author
Forward
0 new messages