Pages: [1]   Go Down
Author Topic: Pandora Server generic_data_string markup problem  (Read 592 times)
0 Members and 2 Guests are viewing this topic.
Joao
Jr. Member
**

Karma: 0
Offline Offline

Posts: 13


View Profile
« on: February 06, 2006, 06:10:48 PM »

One of the great things on Pandora is that it's extremely flexible.
While trying to send markup strings from a generic_data_string module, data packets were either:
1) being discarded and not processed
2) generating input as hash(x?x?) value on Pandora Web

Examples of this are modules that return HTML input:
  Pandora Web Page

The above string is interpreted by the server as XML and not as a string while processing the data packet (using XMLin input).

We have resolved this in the meantime by analysing if the incoming string is an XML value. If so, we transform it again to a string.

Code location: pandora_server/bin/pandora_db.pm
Code function: sub module_generic_data_string (%$$$$$)
Code inserted:
  use XML::Simple;
  (...)
  if (ref($m_data) eq "HASH") {
    $m_data = XMLout($m_data, RootName=>undef);
  }

Hope this helps.
Cheers
« Last Edit: January 01, 1970, 01:00:00 AM by Joao » Logged

Sancho Lerena
Administrator
Expert member
*****

Karma: 24
Offline Offline

Posts: 1151


I can see everything... with my glasses :-)


View Profile WWW
« Reply #1 on: February 06, 2006, 06:25:25 PM »

Thanks a lot  for the fix !!.

It will be tested and included for 1.2 release.
« Last Edit: January 01, 1970, 01:00:00 AM by nil » Logged

-- See you in the other screen.

Sancho Lerena
Administrator
Expert member
*****

Karma: 24
Offline Offline

Posts: 1151


I can see everything... with my glasses :-)


View Profile WWW
« Reply #2 on: February 07, 2006, 02:20:37 AM »

I actually get some extrange data, for example

Data string:

Feb  7 02:07:00 rhino Pandora Web Page

Converts to:

Pandora Web Page <content>Feb  7 02:07:00 rhino </content>

XML conversion seems to be invalid :(, its better than nothing, but i need to improve it.
« Last Edit: January 01, 1970, 01:00:00 AM by nil » Logged

-- See you in the other screen.

Joao
Jr. Member
**

Karma: 0
Offline Offline

Posts: 13


View Profile
« Reply #3 on: February 07, 2006, 09:36:23 AM »

My modules that return XML/HTML markup always have a primary tag, like in
  Pandora Web Page

The example you posted has some text before the tag making it an invalid XML/HTML subset. Unfortunately, I did not test the XML conversion this way.

Don't know if you are aware of it but Data::Dumper extension could help in this case. Juse [m]use Data::Dumper[/m] in the beginning of the code and then [m]print Dumper($m_data)[/m] to get a representation of the XML tree structure. You might want probably to print it to the logger  ;-) .

I'll try to take a look into it. Should I find some additional info, I'll post it  :-)
« Last Edit: January 01, 1970, 01:00:00 AM by Joao » Logged

raul
Administrator
Expert member
*****

Karma: 1
Offline Offline

Posts: 576



View Profile
« Reply #4 on: February 07, 2006, 10:45:22 AM »

Labeled as bug PS-060103-1
« Last Edit: January 01, 1970, 01:00:00 AM by raul » Logged

raul
Administrator
Expert member
*****

Karma: 1
Offline Offline

Posts: 576



View Profile
« Reply #5 on: February 07, 2006, 07:20:49 PM »

Solved in the last update of Pandora Server 1.2 Beta
« Last Edit: January 01, 1970, 01:00:00 AM by raul » Logged

Pages: [1]   Go Up
Print
 
Jump to:  


SourceForge.net Logo  This site is monitored by Pandora FMS   ArticaST