[collectd] curl_xml plugin
octo at verplant.org
Mon Jan 11 16:56:21 CET 2010
thank you very much for your patch :)
I've applied the patch to my working directory and submitted it (and
some changes of my own) to the “ag/curl_xml” branch of the Git
repository. If you don't want to use Git you can download the latest
version of src/curl_xml.c from .
I did the following changes:
* Re-order all of the functions to get rid of the forward declarations.
* Replace the string and boolean handling functions for config options
with functions declared in src/configfile.h. This way the
functionality is not duplicated.
* Put the type_instance setting and value parsing into a separate
functions. This makes “cx_submit_xpath_values” considerably bit
Please let me know if my changes broke anything – unfortunately I didn't
have the possibility to test them :/
> #define CX_KEY_MAGIC 0x43484b59UL /* CHKY */
> #define CX_IS_KEY(key) (key)->magic == CX_KEY_MAGIC
What do we need this hack for? I've found only one place where
“c_avl_insert” is called, so the elements in the tree should all be of
the same type, right? I'd be great if you could remove or document this.
Maybe the entire AVL tree should be removed: As far as I see it is only
used to iterate over the values (rather than searching for a specific
key), so a linked list is probably more appropriate.
Both, “cx_check_type” and “cx_submit_xpath_values” call “plugin_get_ds”.
I think one call could be optimized away.
Florian octo Forster
Hacker in training
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20100111/ba12bdef/attachment.pgp
More information about the collectd