summaryrefslogtreecommitdiffstats
path: root/lib/Plugins
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Plugins')
-rw-r--r--lib/Plugins/Bugzilla.GTKBuilder254
-rw-r--r--lib/Plugins/Bugzilla.cpp8
-rw-r--r--lib/Plugins/Bugzilla.h2
-rw-r--r--lib/Plugins/CCpp.cpp11
-rw-r--r--lib/Plugins/Catcut.GTKBuilder237
-rw-r--r--lib/Plugins/Catcut.cpp2
-rw-r--r--lib/Plugins/Catcut.h2
-rw-r--r--lib/Plugins/FileTransfer.cpp10
-rw-r--r--lib/Plugins/Firefox.cpp6
-rw-r--r--lib/Plugins/KerneloopsReporter.GTKBuilder75
-rw-r--r--lib/Plugins/KerneloopsReporter.cpp11
-rw-r--r--lib/Plugins/KerneloopsReporter.h4
-rw-r--r--lib/Plugins/KerneloopsScanner.cpp2
-rw-r--r--lib/Plugins/KerneloopsSysLog.cpp4
-rw-r--r--lib/Plugins/Logger.GTKBuilder98
-rw-r--r--lib/Plugins/Logger.cpp7
-rw-r--r--lib/Plugins/Logger.h2
-rw-r--r--lib/Plugins/Mailx.GTKBuilder194
-rw-r--r--lib/Plugins/Mailx.cpp5
-rw-r--r--lib/Plugins/Mailx.h2
-rw-r--r--lib/Plugins/Python.cpp16
-rw-r--r--lib/Plugins/SOSreport.cpp7
-rw-r--r--lib/Plugins/SQLite3.cpp8
-rw-r--r--lib/Plugins/TicketUploader.GTKBuilder312
-rw-r--r--lib/Plugins/TicketUploader.cpp18
-rw-r--r--lib/Plugins/TicketUploader.h2
26 files changed, 715 insertions, 584 deletions
diff --git a/lib/Plugins/Bugzilla.GTKBuilder b/lib/Plugins/Bugzilla.GTKBuilder
index 998dc739..95abb71a 100644
--- a/lib/Plugins/Bugzilla.GTKBuilder
+++ b/lib/Plugins/Bugzilla.GTKBuilder
@@ -3,7 +3,8 @@
<requires lib="gtk+" version="2.14"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkDialog" id="PluginDialog">
- <property name="border_width">5</property>
+ <property name="border_width">12</property>
+ <property name="resizable">False</property>
<property name="modal">True</property>
<property name="window_position">center-on-parent</property>
<property name="type_hint">normal</property>
@@ -12,136 +13,173 @@
<object class="GtkVBox" id="dialog-vbox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
- <property name="spacing">2</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkVBox" id="vbox1">
+ <object class="GtkFrame" id="frame1">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
<child>
- <object class="GtkLabel" id="label1">
+ <object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
- <property name="label" translatable="yes">Bugzilla plugin configuration</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkTable" id="table1">
- <property name="visible">True</property>
- <property name="n_rows">4</property>
- <property name="n_columns">2</property>
- <child>
- <object class="GtkLabel" id="lBugzillaURL">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Bugzilla URL</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="lLogin">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Login</property>
- </object>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lPassword">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Password</property>
- </object>
- <packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="conf_BugzillaURL">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">&#x25CF;</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- </packing>
- </child>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
<child>
- <object class="GtkEntry" id="conf_Login">
+ <object class="GtkTable" id="table1">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">&#x25CF;</property>
+ <property name="n_rows">5</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">12</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="lBugzillaURL">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Bugzilla URL:</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="lLogin">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Login:</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="lPassword">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Password:</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="conf_BugzillaURL">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">&#x25CF;</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="conf_Login">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">&#x25CF;</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="conf_Password">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="visibility">False</property>
+ <property name="invisible_char">&#x25CF;</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="cb_Password">
+ <property name="label" translatable="yes">Show password</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label3">
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="conf_NoSSLVerify">
+ <property name="label" translatable="yes">No SSL verify</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ </packing>
+ </child>
</object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="conf_Password">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="visibility">False</property>
- <property name="invisible_char">&#x25CF;</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="cb_Password">
- <property name="label" translatable="yes">Show password</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- </packing>
- </child>
- <child>
- <placeholder/>
</child>
</object>
- <packing>
- <property name="position">1</property>
- </packing>
</child>
- <child>
- <object class="GtkCheckButton" id="conf_NoSSLVerify">
- <property name="label" translatable="yes">No SSL verify</property>
+ <child type="label">
+ <object class="GtkLabel" id="label2">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
+ <property name="label" translatable="yes">&lt;b&gt;Bugzilla plugin configuration&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
</object>
- <packing>
- <property name="position">2</property>
- </packing>
</child>
</object>
<packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Don't have an account yet? You can register at https://bugzilla.redhat.com/createaccount.cgi</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
<child internal-child="action_area">
<object class="GtkHButtonBox" id="dialog-action_area1">
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="bApply">
- <property name="label" translatable="yes">gtk-apply</property>
+ <property name="label">gtk-apply</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -155,7 +193,7 @@
</child>
<child>
<object class="GtkButton" id="button2">
- <property name="label" translatable="yes">gtk-cancel</property>
+ <property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
diff --git a/lib/Plugins/Bugzilla.cpp b/lib/Plugins/Bugzilla.cpp
index f17f9a74..2d065f67 100644
--- a/lib/Plugins/Bugzilla.cpp
+++ b/lib/Plugins/Bugzilla.cpp
@@ -52,7 +52,7 @@ void ctx::login(const char* login, const char* passwd)
std::string errmsg = ssprintf("Can't login. Check Edit->Plugins->Bugzilla and /etc/abrt/plugins/Bugzilla.conf. Server said: %s", env.fault_string);
xmlrpc_env_clean(&env);
error_msg("%s", errmsg.c_str()); // show error in daemon log
- throw CABRTException(EXCEP_PLUGIN, errmsg);
+ throw CABRTException(EXCEP_PLUGIN, errmsg.c_str());
}
}
@@ -287,7 +287,7 @@ void ctx::add_attachments(const char* bug_id_str, const map_crash_report_t& pCra
if (type == CD_ATT)
{
char *encoded64 = encode_base64(content.c_str(), content.length());
- xmlrpc_value* param = xmlrpc_build_value(&env,"(s{s:s,s:s,s:s,s:s})",
+ xmlrpc_value* param = xmlrpc_build_value(&env, "(s{s:s,s:s,s:s,s:s})",
bug_id_str,
"description", ("File: " + filename).c_str(),
"filename", filename.c_str(),
@@ -323,7 +323,7 @@ CReporterBugzilla::~CReporterBugzilla()
std::string CReporterBugzilla::Report(const map_crash_report_t& pCrashReport,
const map_plugin_settings_t& pSettings,
- const std::string& pArgs)
+ const char *pArgs)
{
int32_t bug_id = -1;
std::string Login;
@@ -483,7 +483,7 @@ void CReporterBugzilla::SetSettings(const map_plugin_settings_t& pSettings)
m_sBugzillaURL.erase(m_sBugzillaURL.length() - 1);
}
/*
- if(*(--m_sBugzillaURL.end()) == '/')
+ if (*(--m_sBugzillaURL.end()) == '/')
{
m_sBugzillaURL.erase(--m_sBugzillaURL.end());
}
diff --git a/lib/Plugins/Bugzilla.h b/lib/Plugins/Bugzilla.h
index 9130a698..ee6bc6a5 100644
--- a/lib/Plugins/Bugzilla.h
+++ b/lib/Plugins/Bugzilla.h
@@ -22,7 +22,7 @@ class CReporterBugzilla : public CReporter
virtual std::string Report(const map_crash_report_t& pCrashReport,
const map_plugin_settings_t& pSettings,
- const std::string& pArgs);
+ const char *pArgs);
virtual void SetSettings(const map_plugin_settings_t& pSettings);
virtual const map_plugin_settings_t& GetSettings();
diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp
index 5d344c0d..add4e50f 100644
--- a/lib/Plugins/CCpp.cpp
+++ b/lib/Plugins/CCpp.cpp
@@ -277,7 +277,7 @@ static void GetBacktrace(const char *pDebugDumpDir,
unsetenv("TERM");
putenv((char*)"TERM=dumb");
- char *args[11];
+ char *args[13];
args[0] = (char*)"gdb";
args[1] = (char*)"-batch";
@@ -315,7 +315,9 @@ static void GetBacktrace(const char *pDebugDumpDir,
args[8] = (char*)"-ex";
args[9] = (char*)"thread apply all backtrace full";
- args[10] = NULL;
+ args[10] = (char*)"-ex";
+ args[11] = (char*)"info sharedlib";
+ args[12] = NULL;
ExecVP(args, atoi(UID.c_str()), pBacktrace);
}
@@ -433,6 +435,7 @@ static void InstallDebugInfos(const char *pDebugDumpDir,
build_ids += "Debuginfo absent: ";
build_ids += buff + 8;
build_ids += "\n";
+ continue;
}
const char *p = buff;
@@ -442,7 +445,7 @@ static void InstallDebugInfos(const char *pDebugDumpDir,
}
if (*p)
{
- log("%s", buff);
+ VERB1 log("%s", buff);
update_client("%s", buff);
}
}
@@ -654,8 +657,6 @@ static bool DebuginfoCheckPolkit(int uid)
void CAnalyzerCCpp::CreateReport(const char *pDebugDumpDir, int force)
{
- update_client(_("Starting report creation..."));
-
string package;
string backtrace;
string UID;
diff --git a/lib/Plugins/Catcut.GTKBuilder b/lib/Plugins/Catcut.GTKBuilder
index b8c7c313..9f314f0b 100644
--- a/lib/Plugins/Catcut.GTKBuilder
+++ b/lib/Plugins/Catcut.GTKBuilder
@@ -3,7 +3,8 @@
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkDialog" id="PluginDialog">
- <property name="border_width">5</property>
+ <property name="border_width">12</property>
+ <property name="resizable">False</property>
<property name="modal">True</property>
<property name="window_position">center-on-parent</property>
<property name="type_hint">normal</property>
@@ -12,126 +13,150 @@
<object class="GtkVBox" id="dialog-vbox3">
<property name="visible">True</property>
<property name="orientation">vertical</property>
- <property name="spacing">2</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkVBox" id="vbox1">
+ <object class="GtkFrame" id="frame1">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
<child>
- <object class="GtkLabel" id="label1">
+ <object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
- <property name="label" translatable="yes">Catcut plugin configuration</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkTable" id="table1">
- <property name="visible">True</property>
- <property name="n_rows">4</property>
- <property name="n_columns">2</property>
- <child>
- <object class="GtkLabel" id="lCatcutURL">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Catcut URL</property>
- </object>
- </child>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
<child>
- <object class="GtkLabel" id="lLogin">
+ <object class="GtkTable" id="table1">
<property name="visible">True</property>
- <property name="label" translatable="yes">Login</property>
+ <property name="n_rows">5</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">12</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="lCatcutURL">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Catcut URL:</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="lLogin">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Login:</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="lPassword">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Password:</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="conf_CatcutURL">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">&#x25CF;</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="conf_Login">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">&#x25CF;</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="conf_Password">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="visibility">False</property>
+ <property name="invisible_char">&#x25CF;</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="cb_Password">
+ <property name="label" translatable="yes">Show password</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label3">
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="conf_NoSSLVerify">
+ <property name="label" translatable="yes">No SSL verify</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ </packing>
+ </child>
</object>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lPassword">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Password</property>
- </object>
- <packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="conf_CatcutURL">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">&#x25CF;</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="conf_Login">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">&#x25CF;</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="conf_Password">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="visibility">False</property>
- <property name="invisible_char">&#x25CF;</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="cb_Password">
- <property name="label" translatable="yes">Show password</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- </packing>
- </child>
- <child>
- <placeholder/>
</child>
</object>
- <packing>
- <property name="position">1</property>
- </packing>
</child>
- <child>
- <object class="GtkCheckButton" id="conf_NoSSLVerify">
- <property name="label" translatable="yes">No SSL verify</property>
+ <child type="label">
+ <object class="GtkLabel" id="label2">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
+ <property name="label" translatable="yes">&lt;b&gt;Catcut plugin configuration&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
</object>
- <packing>
- <property name="position">2</property>
- </packing>
</child>
</object>
<packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
diff --git a/lib/Plugins/Catcut.cpp b/lib/Plugins/Catcut.cpp
index 7add58c0..9974faa9 100644
--- a/lib/Plugins/Catcut.cpp
+++ b/lib/Plugins/Catcut.cpp
@@ -436,7 +436,7 @@ CReporterCatcut::~CReporterCatcut()
string CReporterCatcut::Report(const map_crash_report_t& pCrashReport,
const map_plugin_settings_t& pSettings,
- const string& pArgs)
+ const char *pArgs)
{
update_client(_("Creating new bug..."));
try
diff --git a/lib/Plugins/Catcut.h b/lib/Plugins/Catcut.h
index 4fb89e22..00f486c0 100644
--- a/lib/Plugins/Catcut.h
+++ b/lib/Plugins/Catcut.h
@@ -22,7 +22,7 @@ class CReporterCatcut : public CReporter
virtual std::string Report(const map_crash_report_t& pCrashReport,
const map_plugin_settings_t& pSettings,
- const std::string& pArgs);
+ const char *Args);
};
#endif /* CATCUT_H_ */
diff --git a/lib/Plugins/FileTransfer.cpp b/lib/Plugins/FileTransfer.cpp
index 868f54dd..03ee464d 100644
--- a/lib/Plugins/FileTransfer.cpp
+++ b/lib/Plugins/FileTransfer.cpp
@@ -79,12 +79,12 @@ void CFileTransfer::SendFile(const char *pURL, const char *pFilename)
f = fopen(pFilename, "r");
if (!f)
{
- throw CABRTException(EXCEP_PLUGIN, ssprintf("Can't open archive file '%s'", pFilename));
+ throw CABRTException(EXCEP_PLUGIN, "Can't open archive file '%s'", pFilename);
}
if (fstat(fileno(f), &buf) == -1)
{
fclose(f);
- throw CABRTException(EXCEP_PLUGIN, ssprintf("Can't stat archive file '%s'", pFilename));
+ throw CABRTException(EXCEP_PLUGIN, "Can't stat archive file '%s'", pFilename);
}
curl = curl_easy_init();
if (!curl)
@@ -114,7 +114,7 @@ now used in create_zip, but can be useful for some future
archivers as well
*/
static void traverse_directory(const char * directory, void * something,
- void (*func)(void *,const char *) )
+ void (*func)(void *, const char *) )
{
DIR * dp;
struct dirent * dirp;
@@ -225,7 +225,7 @@ static void create_tarbz2(const char * archive_name, const char * directory)
#define BLOCK_MULTIPLIER 7
name_without_bz2 = xstrdup(archive_name);
- strrchr(name_without_bz2,'.')[0] = '\0';
+ strrchr(name_without_bz2, '.')[0] = '\0';
create_tar(name_without_bz2, directory);
tarFD = open(name_without_bz2, O_RDONLY);
@@ -282,7 +282,7 @@ void CFileTransfer::CreateArchive(const char *pArchiveName, const char *pDir)
}
else
{
- throw CABRTException(EXCEP_PLUGIN, "Unknown/unsupported archive type " + m_sArchiveType);
+ throw CABRTException(EXCEP_PLUGIN, "Unknown/unsupported archive type %s", m_sArchiveType.c_str());
}
}
diff --git a/lib/Plugins/Firefox.cpp b/lib/Plugins/Firefox.cpp
index 68dbd39e..6f2c60d6 100644
--- a/lib/Plugins/Firefox.cpp
+++ b/lib/Plugins/Firefox.cpp
@@ -100,7 +100,7 @@ static pid_t ExecVP(char** pArgs, uid_t uid, std::string& pOutput)
struct passwd* pw = getpwuid(uid);
if (!pw)
{
- throw CABRTException(EXCEP_PLUGIN, std::string(__func__) + ": cannot get GID for UID.");
+ throw CABRTException(EXCEP_PLUGIN, "%s: can't get GID for UID", __func__);
}
xpipe(pipeout);
@@ -662,7 +662,7 @@ Another application is holding the yum lock, cannot continue
fclose(pipeout_fp);
kill(child, SIGTERM);
wait(NULL);
- throw CABRTException(EXCEP_PLUGIN, std::string(__func__) + ": cannot install debuginfos for " + pPackage);
+ throw CABRTException(EXCEP_PLUGIN, "%s: can't install debuginfos for %s", __func__, pPackage);
}
#endif
}
@@ -879,8 +879,6 @@ static bool DebuginfoCheckPolkit(int uid)
void CAnalyzerFirefox::CreateReport(const char *pDebugDumpDir, int force)
{
- update_client(_("Starting report creation..."));
-
std::string package;
std::string backtrace;
std::string UID;
diff --git a/lib/Plugins/KerneloopsReporter.GTKBuilder b/lib/Plugins/KerneloopsReporter.GTKBuilder
index 74cb36b9..65f993f3 100644
--- a/lib/Plugins/KerneloopsReporter.GTKBuilder
+++ b/lib/Plugins/KerneloopsReporter.GTKBuilder
@@ -3,55 +3,68 @@
<requires lib="gtk+" version="2.14"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkDialog" id="PluginDialog">
- <property name="border_width">5</property>
+ <property name="border_width">12</property>
+ <property name="resizable">False</property>
+ <property name="modal">True</property>
<property name="type_hint">normal</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
- <property name="spacing">2</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkVBox" id="vbox1">
+ <object class="GtkFrame" id="frame1">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
<child>
- <object class="GtkLabel" id="label1">
+ <object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
- <property name="label" translatable="yes">Kerneloops Reporter plugin configuration</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkTable" id="table1">
- <property name="visible">True</property>
- <property name="n_columns">2</property>
- <child>
- <object class="GtkLabel" id="lSubmitURL">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Submit URL</property>
- </object>
- </child>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
<child>
- <object class="GtkEntry" id="conf_SubmitURL">
+ <object class="GtkTable" id="table1">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">&#x25CF;</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">12</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="lSubmitURL">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Submit URL:</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="conf_SubmitURL">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">&#x25CF;</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
</object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- </packing>
</child>
</object>
- <packing>
- <property name="position">1</property>
- </packing>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">&lt;b&gt;Kerneloops Reporter plugin configuration&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
</child>
</object>
<packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
diff --git a/lib/Plugins/KerneloopsReporter.cpp b/lib/Plugins/KerneloopsReporter.cpp
index a1fd3f16..26430be6 100644
--- a/lib/Plugins/KerneloopsReporter.cpp
+++ b/lib/Plugins/KerneloopsReporter.cpp
@@ -95,7 +95,7 @@ CKerneloopsReporter::CKerneloopsReporter() :
std::string CKerneloopsReporter::Report(const map_crash_report_t& pCrashReport,
const map_plugin_settings_t& pSettings,
- const std::string& pArgs)
+ const char *pArgs)
{
int ret = -1;
@@ -111,9 +111,14 @@ std::string CKerneloopsReporter::Report(const map_crash_report_t& pCrashReport,
if (ret) {
/* FIXME: be more informative */
- throw CABRTException(EXCEP_PLUGIN, std::string("CKerneloopsReporter::Report(): Report has not been sent..."));
+ throw CABRTException(EXCEP_PLUGIN, "CKerneloopsReporter::Report(): Report has not been sent");
}
- return "Kernel oops report was uploaded.";
+ /* Server replies with:
+ * 200 thank you for submitting the kernel oops information
+ * RemoteIP: 34192fd15e34bf60fac6a5f01bba04ddbd3f0558
+ * - no URL or bug ID apparently...
+ */
+ return "Kernel oops report was uploaded";
}
void CKerneloopsReporter::SetSettings(const map_plugin_settings_t& pSettings)
diff --git a/lib/Plugins/KerneloopsReporter.h b/lib/Plugins/KerneloopsReporter.h
index af82afbe..10e5e644 100644
--- a/lib/Plugins/KerneloopsReporter.h
+++ b/lib/Plugins/KerneloopsReporter.h
@@ -44,8 +44,8 @@ class CKerneloopsReporter : public CReporter
//ok to delete?
// virtual const map_plugin_settings_t& GetSettings();
virtual std::string Report(const map_crash_report_t& pCrashReport,
- const map_plugin_settings_t& pSettings,
- const std::string& pArgs);
+ const map_plugin_settings_t& pSettings,
+ const char *pArgs);
};
#endif
diff --git a/lib/Plugins/KerneloopsScanner.cpp b/lib/Plugins/KerneloopsScanner.cpp
index 3831f9e6..128e0837 100644
--- a/lib/Plugins/KerneloopsScanner.cpp
+++ b/lib/Plugins/KerneloopsScanner.cpp
@@ -109,7 +109,7 @@ void CKerneloopsScanner::SaveOopsToDebugDump()
}
catch (CABRTException& e)
{
- throw CABRTException(EXCEP_PLUGIN, std::string(__func__) + ": " + e.what());
+ throw CABRTException(EXCEP_PLUGIN, "%s: %s", __func__, e.what());
}
oopsList.pop_back();
}
diff --git a/lib/Plugins/KerneloopsSysLog.cpp b/lib/Plugins/KerneloopsSysLog.cpp
index fdb4a029..adff8468 100644
--- a/lib/Plugins/KerneloopsSysLog.cpp
+++ b/lib/Plugins/KerneloopsSysLog.cpp
@@ -52,7 +52,9 @@ static int extract_version(const char *linepointer, char *version)
start = strstr((char*)linepointer, "2.6.");
if (start) {
- end = strchrnul(start, ' ');
+ end = strchr(start, ')');
+ if (!end)
+ end = strchrnul(start, ' ');
strncpy(version, start, end-start);
ret = 1;
}
diff --git a/lib/Plugins/Logger.GTKBuilder b/lib/Plugins/Logger.GTKBuilder
index a6b82c00..26ac10fe 100644
--- a/lib/Plugins/Logger.GTKBuilder
+++ b/lib/Plugins/Logger.GTKBuilder
@@ -3,67 +3,85 @@
<requires lib="gtk+" version="2.14"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkDialog" id="PluginDialog">
- <property name="border_width">5</property>
+ <property name="border_width">12</property>
+ <property name="resizable">False</property>
+ <property name="modal">True</property>
+ <property name="window_position">center-on-parent</property>
<property name="type_hint">normal</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
- <property name="spacing">2</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkVBox" id="vbox1">
+ <object class="GtkFrame" id="frame1">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
<child>
- <object class="GtkLabel" id="label1">
+ <object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
- <property name="label" translatable="yes">Logger plugin configuration</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkTable" id="table1">
- <property name="visible">True</property>
- <property name="n_columns">2</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
<child>
- <object class="GtkLabel" id="lLogPath">
+ <object class="GtkTable" id="table1">
<property name="visible">True</property>
- <property name="label" translatable="yes">Logger file</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">12</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="lLogPath">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Logger file:</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="conf_LogPath">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">&#x25CF;</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="conf_AppendLogs">
+ <property name="label" translatable="yes">Append new logs</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
</object>
</child>
- <child>
- <object class="GtkEntry" id="conf_LogPath">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">&#x25CF;</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- </packing>
- </child>
</object>
- <packing>
- <property name="position">1</property>
- </packing>
</child>
- <child>
- <object class="GtkCheckButton" id="conf_AppendLogs">
- <property name="label" translatable="yes">Append new logs</property>
+ <child type="label">
+ <object class="GtkLabel" id="label2">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
+ <property name="label" translatable="yes">&lt;b&gt;Logger plugin configuration&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
</object>
- <packing>
- <property name="position">2</property>
- </packing>
</child>
</object>
<packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
diff --git a/lib/Plugins/Logger.cpp b/lib/Plugins/Logger.cpp
index 7267b648..a0dea424 100644
--- a/lib/Plugins/Logger.cpp
+++ b/lib/Plugins/Logger.cpp
@@ -60,9 +60,9 @@ void CLogger::SetSettings(const map_plugin_settings_t& pSettings)
//}
std::string CLogger::Report(const map_crash_report_t& pCrashReport,
- const map_plugin_settings_t& pSettings, const std::string& pArgs)
+ const map_plugin_settings_t& pSettings,
+ const char *pArgs)
{
- update_client(_("Creating a report..."));
std::string description = make_description_logger(pCrashReport);
description += "\n\n\n";
@@ -79,12 +79,13 @@ std::string CLogger::Report(const map_crash_report_t& pCrashReport,
if (fOut)
{
+ update_client(_("Writing report to '%s'"), m_sLogPath.c_str());
fputs(description.c_str(), fOut);
fclose(fOut);
return "file://" + m_sLogPath;
}
- throw CABRTException(EXCEP_PLUGIN, "CLogger::Report(): Cannot open file: " + m_sLogPath);
+ throw CABRTException(EXCEP_PLUGIN, "Can't open '%s'", m_sLogPath.c_str());
}
PLUGIN_INFO(REPORTER,
diff --git a/lib/Plugins/Logger.h b/lib/Plugins/Logger.h
index 285e25ba..c7d76798 100644
--- a/lib/Plugins/Logger.h
+++ b/lib/Plugins/Logger.h
@@ -39,7 +39,7 @@ class CLogger : public CReporter
// virtual const map_plugin_settings_t& GetSettings();
virtual std::string Report(const map_crash_report_t& pCrashReport,
const map_plugin_settings_t& pSettings,
- const std::string& pArgs);
+ const char *pArgs);
};
#endif /* LOGGER_H_ */
diff --git a/lib/Plugins/Mailx.GTKBuilder b/lib/Plugins/Mailx.GTKBuilder
index a823eca1..55647e10 100644
--- a/lib/Plugins/Mailx.GTKBuilder
+++ b/lib/Plugins/Mailx.GTKBuilder
@@ -3,114 +3,134 @@
<requires lib="gtk+" version="2.14"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkDialog" id="PluginDialog">
- <property name="border_width">5</property>
+ <property name="border_width">12</property>
+ <property name="resizable">False</property>
+ <property name="modal">True</property>
+ <property name="window_position">center-on-parent</property>
<property name="type_hint">normal</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
- <property name="spacing">2</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkVBox" id="vbox1">
+ <object class="GtkFrame" id="frame1">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
<child>
- <object class="GtkLabel" id="label1">
+ <object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
- <property name="label" translatable="yes">Mailx plugin configuration</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkTable" id="table1">
- <property name="visible">True</property>
- <property name="n_rows">3</property>
- <property name="n_columns">2</property>
- <child>
- <object class="GtkLabel" id="lSubject">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Subject:</property>
- </object>
- </child>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
<child>
- <object class="GtkEntry" id="conf_Subject">
+ <object class="GtkTable" id="table1">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">&#x25CF;</property>
+ <property name="n_rows">4</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">12</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="lSubject">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Subject:</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="conf_Subject">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">&#x25CF;</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="conf_EmailFrom">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">&#x25CF;</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="lEmailFrom">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Your Email:</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="lEmailTo">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Recipient's Email:</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="conf_EmailTo">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">&#x25CF;</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="conf_SendBinaryData">
+ <property name="label" translatable="yes">Send Binary Data</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ </packing>
+ </child>
</object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="conf_EmailFrom">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">&#x25CF;</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lEmailFrom">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Your Email:</property>
- </object>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lEmailTo">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Recipient's Email:</property>
- </object>
- <packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="conf_EmailTo">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">&#x25CF;</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- </packing>
</child>
</object>
- <packing>
- <property name="position">1</property>
- </packing>
</child>
- <child>
- <object class="GtkCheckButton" id="conf_SendBinaryData">
- <property name="label" translatable="yes">Send Binary Data</property>
+ <child type="label">
+ <object class="GtkLabel" id="label2">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
+ <property name="label" translatable="yes">&lt;b&gt;Mailx plugin configuration&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
</object>
- <packing>
- <property name="position">2</property>
- </packing>
</child>
</object>
<packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
diff --git a/lib/Plugins/Mailx.cpp b/lib/Plugins/Mailx.cpp
index dc6e2b0e..26b6ec41 100644
--- a/lib/Plugins/Mailx.cpp
+++ b/lib/Plugins/Mailx.cpp
@@ -84,7 +84,8 @@ static char** append_str_to_vector(char **vec, unsigned &size, const char *str)
}
std::string CMailx::Report(const map_crash_report_t& pCrashReport,
- const map_plugin_settings_t& pSettings, const std::string& pArgs)
+ const map_plugin_settings_t& pSettings,
+ const char *pArgs)
{
char **args = NULL;
unsigned arg_size = 0;
@@ -156,7 +157,7 @@ std::string CMailx::Report(const map_crash_report_t& pCrashReport,
emailBody += '\n';
args = append_str_to_vector(args, arg_size, "-s");
- args = append_str_to_vector(args, arg_size, (pArgs != "" ? pArgs.c_str() : m_sSubject.c_str()));
+ args = append_str_to_vector(args, arg_size, (pArgs[0] != '\0' ? pArgs : m_sSubject.c_str()));
args = append_str_to_vector(args, arg_size, "-r");
args = append_str_to_vector(args, arg_size, m_sEmailFrom.c_str());
args = append_str_to_vector(args, arg_size, m_sEmailTo.c_str());
diff --git a/lib/Plugins/Mailx.h b/lib/Plugins/Mailx.h
index d6d66bd8..1ddb5ff0 100644
--- a/lib/Plugins/Mailx.h
+++ b/lib/Plugins/Mailx.h
@@ -43,7 +43,7 @@ class CMailx : public CReporter
// virtual const map_plugin_settings_t& GetSettings();
virtual std::string Report(const map_crash_report_t& pCrashReport,
const map_plugin_settings_t& pSettings,
- const std::string& pArgs);
+ const char *pArgs);
};
#endif
diff --git a/lib/Plugins/Python.cpp b/lib/Plugins/Python.cpp
index a5e9909d..906e815d 100644
--- a/lib/Plugins/Python.cpp
+++ b/lib/Plugins/Python.cpp
@@ -4,7 +4,6 @@
#include "ABRTException.h"
#define FILENAME_BACKTRACE "backtrace"
-#define PYHOOK_CONFIG "/etc/abrt/pyhook.conf"
static std::string CreateHash(const char *pDebugDumpDir)
{
@@ -26,25 +25,10 @@ std::string CAnalyzerPython::GetGlobalUUID(const char *pDebugDumpDir)
void CAnalyzerPython::Init()
{
- std::ofstream fOutPySiteCustomize;
- fOutPySiteCustomize.open(PYHOOK_CONFIG);
- if (fOutPySiteCustomize.is_open())
- {
- fOutPySiteCustomize << "enabled = yes" << std::endl;
- fOutPySiteCustomize.close();
- }
}
void CAnalyzerPython::DeInit()
{
- // TODO: remove copied abrt exception handler
- std::ofstream fOutPySiteCustomize;
- fOutPySiteCustomize.open(PYHOOK_CONFIG);
- if (fOutPySiteCustomize.is_open())
- {
- fOutPySiteCustomize << "enabled = no" << std::endl;
- fOutPySiteCustomize.close();
- }
}
PLUGIN_INFO(ANALYZER,
diff --git a/lib/Plugins/SOSreport.cpp b/lib/Plugins/SOSreport.cpp
index 65d01a72..6f231659 100644
--- a/lib/Plugins/SOSreport.cpp
+++ b/lib/Plugins/SOSreport.cpp
@@ -104,10 +104,9 @@ void CActionSOSreport::Run(const char *pActionDir, const char *pArgs)
if (copy_file(sosreport_filename.c_str(), sosreport_dd_filename.c_str()) < 0)
{
throw CABRTException(EXCEP_PLUGIN,
- ssprintf("Can't copy '%s' to '%s'",
- sosreport_filename.c_str(),
- sosreport_dd_filename.c_str()
- )
+ "Can't copy '%s' to '%s'",
+ sosreport_filename.c_str(),
+ sosreport_dd_filename.c_str()
);
}
}
diff --git a/lib/Plugins/SQLite3.cpp b/lib/Plugins/SQLite3.cpp
index 866b9857..d95c273b 100644
--- a/lib/Plugins/SQLite3.cpp
+++ b/lib/Plugins/SQLite3.cpp
@@ -107,7 +107,7 @@ static void get_table(vector_database_rows_t& pTable,
string errstr = ssprintf("Error in SQL:'%s' error: %s", sql, err);
free(sql);
sqlite3_free(err);
- throw CABRTException(EXCEP_PLUGIN, errstr);
+ throw CABRTException(EXCEP_PLUGIN, errstr.c_str());
}
VERB2 log("%d rows returned by SQL:%s", nrow, sql);
free(sql);
@@ -152,7 +152,7 @@ static void execute_sql(sqlite3 *db, const char *fmt, ...)
string errstr = ssprintf("Error in SQL:'%s' error: %s", sql, err);
free(sql);
sqlite3_free(err);
- throw CABRTException(EXCEP_PLUGIN, errstr);
+ throw CABRTException(EXCEP_PLUGIN, errstr.c_str());
}
VERB2 log("%d rows affected by SQL:%s", sqlite3_changes(db), sql);
free(sql);
@@ -262,7 +262,7 @@ void CSQLite3::Connect()
{
if (ret != SQLITE_CANTOPEN)
{
- throw CABRTException(EXCEP_PLUGIN, ssprintf("CheckDB: Can't open database: %s", sqlite3_errmsg(m_pDB)));
+ throw CABRTException(EXCEP_PLUGIN, "Can't open database: %s", sqlite3_errmsg(m_pDB));
}
ret = sqlite3_open_v2(m_sDBPath.c_str(),
@@ -272,7 +272,7 @@ void CSQLite3::Connect()
);
if (ret != SQLITE_OK)
{
- throw CABRTException(EXCEP_PLUGIN, ssprintf("Can't create database: %s", sqlite3_errmsg(m_pDB)));
+ throw CABRTException(EXCEP_PLUGIN, "Can't create database: %s", sqlite3_errmsg(m_pDB));
}
}
diff --git a/lib/Plugins/TicketUploader.GTKBuilder b/lib/Plugins/TicketUploader.GTKBuilder
index 7865e89e..4695a311 100644
--- a/lib/Plugins/TicketUploader.GTKBuilder
+++ b/lib/Plugins/TicketUploader.GTKBuilder
@@ -4,6 +4,9 @@
<!-- interface-naming-policy project-wide -->
<object class="GtkDialog" id="PluginDialog">
<property name="border_width">5</property>
+ <property name="resizable">False</property>
+ <property name="modal">True</property>
+ <property name="window_position">center-on-parent</property>
<property name="type_hint">normal</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
@@ -12,163 +15,186 @@
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
- <object class="GtkVBox" id="vbox1">
+ <object class="GtkFrame" id="frame1">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
<child>
- <object class="GtkLabel" id="label1">
+ <object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
- <property name="label" translatable="yes">Ticket Uploader plugin configuration</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkTable" id="table1">
- <property name="visible">True</property>
- <property name="n_rows">5</property>
- <property name="n_columns">2</property>
- <child>
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Customer</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Ticket</property>
- </object>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">URL</property>
- </object>
- <packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="conf_Customer">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">&#x25CF;</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="conf_Ticket">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">&#x25CF;</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="conf_URL">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">&#x25CF;</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label5">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Retry count</property>
- </object>
- <packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- </packing>
- </child>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
<child>
- <object class="GtkEntry" id="conf_RetryCount">
+ <object class="GtkTable" id="table1">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">&#x25CF;</property>
+ <property name="n_rows">7</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">12</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Customer:</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Ticket:</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">URL:</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="conf_Customer">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">&#x25CF;</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="conf_Ticket">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">&#x25CF;</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="conf_URL">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">&#x25CF;</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label6">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Retry count:</property>
+ </object>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="conf_RetryCount">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">&#x25CF;</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label7">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Retry delay:</property>
+ </object>
+ <packing>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="conf_RetryDelay">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">&#x25CF;</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="conf_Encrypt">
+ <property name="label" translatable="yes">Use encryption</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="conf_Upload">
+ <property name="label" translatable="yes">Upload</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
+ </packing>
+ </child>
</object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label6">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Retry delay</property>
- </object>
- <packing>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="conf_RetryDelay">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">&#x25CF;</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- </packing>
</child>
</object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="conf_Encrypt">
- <property name="label" translatable="yes">Use encryption</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
</child>
- <child>
- <object class="GtkCheckButton" id="conf_Upload">
- <property name="label" translatable="yes">Upload</property>
+ <child type="label">
+ <object class="GtkLabel" id="label2">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
+ <property name="label" translatable="yes">&lt;b&gt;Ticket Uploader plugin configuration&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
</object>
- <packing>
- <property name="position">3</property>
- </packing>
</child>
</object>
<packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
diff --git a/lib/Plugins/TicketUploader.cpp b/lib/Plugins/TicketUploader.cpp
index 847efdc0..aa6d4124 100644
--- a/lib/Plugins/TicketUploader.cpp
+++ b/lib/Plugins/TicketUploader.cpp
@@ -117,12 +117,12 @@ void CTicketUploader::SendFile(const char *pURL, const char *pFilename)
FILE* f = fopen(pFilename, "r");
if (!f)
{
- throw CABRTException(EXCEP_PLUGIN, ssprintf("Can't open archive file '%s'", pFilename));
+ throw CABRTException(EXCEP_PLUGIN, "Can't open archive file '%s'", pFilename);
}
struct stat buf;
- if (fstat(fileno(f), &buf) == -1)
+ if (fstat(fileno(f), &buf) == -1) /* TODO: never fails */
{
- throw CABRTException(EXCEP_PLUGIN, ssprintf("Can't stat archive file '%s'", pFilename));
+ throw CABRTException(EXCEP_PLUGIN, "Can't stat archive file '%s'", pFilename);
}
CURL* curl = curl_easy_init();
if (!curl)
@@ -156,7 +156,8 @@ void CTicketUploader::SendFile(const char *pURL, const char *pFilename)
string CTicketUploader::Report(const map_crash_report_t& pCrashReport,
- const map_plugin_settings_t& pSettings, const string& pArgs)
+ const map_plugin_settings_t& pSettings,
+ const char *pArgs)
{
update_client(_("Creating an TicketUploader report..."));
@@ -197,7 +198,7 @@ string CTicketUploader::Report(const map_crash_report_t& pCrashReport,
}
string tmptar_name = concat_path_file(tmpdir_name, file_name.c_str());
- if (mkdir(tmptar_name.c_str(),S_IRWXU))
+ if (mkdir(tmptar_name.c_str(), S_IRWXU))
{
Error(ssprintf("Can't mkdir '%s'", tmptar_name.c_str()).c_str());
}
@@ -225,10 +226,9 @@ string CTicketUploader::Report(const map_crash_report_t& pCrashReport,
if (copy_file(it->second[CD_CONTENT].c_str(), ofile_name.c_str()) < 0)
{
throw CABRTException(EXCEP_PLUGIN,
- ssprintf("Can't copy '%s' to '%s'",
- it->second[CD_CONTENT].c_str(),
- ofile_name.c_str()
- )
+ "Can't copy '%s' to '%s'",
+ it->second[CD_CONTENT].c_str(),
+ ofile_name.c_str()
);
}
}
diff --git a/lib/Plugins/TicketUploader.h b/lib/Plugins/TicketUploader.h
index 2a7c98af..e00596f2 100644
--- a/lib/Plugins/TicketUploader.h
+++ b/lib/Plugins/TicketUploader.h
@@ -51,7 +51,7 @@ class CTicketUploader : public CReporter
virtual std::string Report(const map_crash_report_t& pCrashReport,
const map_plugin_settings_t& pSettings,
- const std::string& pArgs);
+ const char *pArgs);
};
#endif