soc.2012.statscollector: bd9e77e0: Add libpurple information
sanket at sanketagarwal.com
sanket at sanketagarwal.com
Mon May 14 13:28:04 EDT 2012
----------------------------------------------------------------------
Revision: bd9e77e0c505ebe47b1d674f12832c6d331fa664
Parent: 11bccdc4e26cf03ef07c1dac41a7387f3dc4ce0f
Author: sanket at sanketagarwal.com
Date: 05/14/12 06:03:31
Branch: im.pidgin.soc.2012.statscollector
URL: http://d.pidgin.im/viewmtn/revision/info/bd9e77e0c505ebe47b1d674f12832c6d331fa664
Changelog:
Add libpurple information
We now record the major, minor and micro versions of libpurple
as part of ``purple-version'' information.
Changes against parent 11bccdc4e26cf03ef07c1dac41a7387f3dc4ce0f
patched pidgin/plugins/statscollector.c
-------------- next part --------------
============================================================
--- pidgin/plugins/statscollector.c d46ca27bcb741f00ed1e2e840832ec7130cdfbdd
+++ pidgin/plugins/statscollector.c 954d16f205b9ddb7d00a72f49cef7f48ecae3b55
@@ -35,6 +35,9 @@ save_xml(){
nroot = xmlnode_new("stats");
+ /* Load CPUinfo strucutre */
+ xmlnode_insert_child(nroot, cpuinfo_xml);
+
nacc = xmlnode_new_child(nroot, "accounts");
nplugins = xmlnode_new_child(nroot, "plugins");
@@ -60,9 +63,6 @@ save_xml(){
}
- /* Load CPUinfo strucutre */
- xmlnode_insert_child(nroot, cpuinfo_xml);
-
data = xmlnode_to_formatted_str(nroot, NULL);
purple_util_write_data_to_file("stats.xml", data, -1);
@@ -86,8 +86,9 @@ get_cpuinfo_xml(){
/* Obtains a XML node containing the CPU info */
- xmlnode *root, *languages, *hardware, *node;
+ xmlnode *root, *languages, *hardware, *node, *ver, *ver1;
const char * const * langs;
+ char temp[10];
int i;
root = xmlnode_new("cpuinfo");
@@ -108,6 +109,31 @@ get_cpuinfo_xml(){
}
+ /* Version information */
+
+ ver = xmlnode_new("purple-version");
+
+ /* Major version */
+ ver1 = xmlnode_new("major");
+ sprintf(temp, "%d", PURPLE_MAJOR_VERSION);
+ xmlnode_insert_data(ver1, temp, -1);
+ xmlnode_insert_child(ver, ver1);
+
+ /* Minor version */
+ ver1 = xmlnode_new("minor");
+ sprintf(temp, "%d", PURPLE_MINOR_VERSION);
+ xmlnode_insert_data(ver1, temp, -1);
+ xmlnode_insert_child(ver, ver1);
+
+ /* Micro version */
+ ver1 = xmlnode_new("micro");
+ sprintf(temp, "%d", PURPLE_MICRO_VERSION);
+ xmlnode_insert_data(ver1, temp, -1);
+ xmlnode_insert_child(ver, ver1);
+
+ /* Add the version information to the root cpuinfo */
+ xmlnode_insert_child(root, ver);
+
purple_debug_info("STATS", "%s\n", xmlnode_to_formatted_str(root, NULL));
return root;
More information about the Commits
mailing list