+ fprintf(f, "\t\t<contactemail>%s</contactemail>\n", crash_emailaddr);
+ fprintf(f, "\t\t<!-- Please email this crashlog to above address -->\n");
+ fprintf(f, "\t</enigma2>\n");
+
+ fprintf(f, "\t<image>\n");
+ std::string model = getFileContent("/proc/stb/info/model");
+ if (model != "Error")
+ {
+ char modelname[STDBUFFER_SIZE];
+ sprintf(modelname, "%s",model.c_str());
+ if (strlen(modelname) && modelname[strlen(modelname)-1] == '\n')
+ modelname[strlen(modelname)-1] = 0;
+ fprintf(f, "\t\t<dreamboxmodel>%s</dreamboxmodel>\n", modelname);
+ }
+ std::string kernel = getFileContent("/proc/cmdline");
+ if (kernel != "Error")
+ {
+ char kernelcmd[STDBUFFER_SIZE];
+ sprintf(kernelcmd, "%s",kernel.c_str());
+ if (strlen(kernelcmd) && kernelcmd[strlen(kernelcmd)-1] == '\n')
+ kernelcmd[strlen(kernelcmd)-1] = 0;
+ fprintf(f, "\t\t<kernelcmdline>%s</kernelcmdline>\n", kernelcmd);
+ }
+ std::string sendAnonCrashlog = getConfigFileValue("config.plugins.crashlogautosubmit.sendAnonCrashlog");
+ if (sendAnonCrashlog == "False" || sendAnonCrashlog == "false") // defaults to true... default anonymized crashlogs
+ {
+ std::string ca = getFileContent("/proc/stb/info/ca");
+ if (ca != "Error")
+ {
+ char dreamboxca[STDBUFFER_SIZE];
+ sprintf(dreamboxca, "%s",ca.c_str());
+ if (strlen(dreamboxca) && dreamboxca[strlen(dreamboxca)-1] == '\n')
+ dreamboxca[strlen(dreamboxca)-1] = 0;
+ fprintf(f, "\t\t<dreamboxca>\n\t\t<![CDATA[\n%s\n\t\t]]>\n\t\t</dreamboxca>\n", dreamboxca);
+ }
+ std::string settings = getFileContent("/etc/enigma2/settings");
+ if (settings != "Error")
+ {
+ fprintf(f, "\t\t<enigma2settings>\n\t\t<![CDATA[\n%s\t\t]]>\n\t\t</enigma2settings>\n", settings.c_str());
+ }
+ }
+ std::string addNetwork = getConfigFileValue("config.plugins.crashlogautosubmit.addNetwork");
+ if (addNetwork == "True" || addNetwork == "true")
+ {
+ std::string nwinterfaces = getFileContent("/etc/network/interfaces");
+ if (nwinterfaces != "Error")
+ {
+ fprintf(f, "\t\t<networkinterfaces>\n\t\t<![CDATA[\n%s\t\t]]>\n\t\t</networkinterfaces>\n", nwinterfaces.c_str());
+ }
+ std::string dns = getFileContent("/etc/resolv.conf");
+ if (dns != "Error")
+ {
+ fprintf(f, "\t\t<dns>\n\t\t<![CDATA[\n%s\t\t]]>\n\t\t</dns>\n", dns.c_str());
+ }
+ std::string defaultgw = getFileContent("/etc/default_gw");
+ if (defaultgw != "Error")
+ {
+ char gateway[STDBUFFER_SIZE];
+ sprintf(gateway, "%s",defaultgw.c_str());
+ if (strlen(gateway) && gateway[strlen(gateway)-1] == '\n')
+ gateway[strlen(gateway)-1] = 0;
+ fprintf(f, "\t\t<defaultgateway>\n\t\t<![CDATA[\n%s\t\t]]>\n\t\t</defaultgateway>\n", gateway);
+ }
+ }
+ std::string addWlan = getConfigFileValue("config.plugins.crashlogautosubmit.addWlan");
+ if (addWlan == "True" || addWlan == "true")
+ {
+ std::string wpasupplicant = getFileContent("/etc/wpa_supplicant.conf");
+ if (wpasupplicant != "Error")
+ {
+ fprintf(f, "\t\t<wpasupplicant>\n\t\t<![CDATA[\n%s\t\t]]>\n\t\t</wpasupplicant>\n", wpasupplicant.c_str());
+ }
+ }
+ std::string imageversion = getFileContent("/etc/image-version");
+ if (imageversion != "Error")
+ {
+ fprintf(f, "\t\t<imageversion>\n\t\t<![CDATA[\n%s\t\t]]>\n\t\t</imageversion>\n", imageversion.c_str());
+ }
+ std::string imageissue = getFileContent("/etc/issue.net");
+ if (imageissue != "Error")
+ {
+ fprintf(f, "\t\t<imageissue>\n\t\t<![CDATA[\n%s\t\t]]>\n\t\t</imageissue>\n", imageissue.c_str());
+ }
+ fprintf(f, "\t</image>\n");
+
+ fprintf(f, "\t<software>\n");
+ std::string installedplugins = execCommand("ipkg list_installed | grep enigma2");
+ fprintf(f, "\t\t<enigma2software>\n\t\t<![CDATA[\n%s\t\t]]>\n\t\t</enigma2software>\n", installedplugins.c_str());
+ std::string dreambox = execCommand("ipkg list_installed | grep dream");
+ fprintf(f, "\t\t<dreamboxsoftware>\n\t\t<![CDATA[\n%s\t\t]]>\n\t\t</dreamboxsoftware>\n", dreambox.c_str());
+ std::string gstreamer = execCommand("ipkg list_installed | grep gst");
+ fprintf(f, "\t\t<gstreamersoftware>\n\t\t<![CDATA[\n%s\t\t]]>\n\t\t</gstreamersoftware>\n", gstreamer.c_str());
+ fprintf(f, "\t</software>\n");
+
+ fprintf(f, "\t<crashlogs>\n");