summaryrefslogtreecommitdiffstats
path: root/src/Daemon
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-09-18 17:32:01 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-09-18 17:32:01 +0200
commit64be7b89afc0822cf24aeeec588ff5f5af5fe8b4 (patch)
tree0edaf0823e11980d2040e6f2a8c837e35dc313ff /src/Daemon
parentad8ac022a2ea7a73ecad1034cf9103d2e1bf2779 (diff)
downloadabrt-64be7b89afc0822cf24aeeec588ff5f5af5fe8b4.tar.gz
abrt-64be7b89afc0822cf24aeeec588ff5f5af5fe8b4.tar.xz
abrt-64be7b89afc0822cf24aeeec588ff5f5af5fe8b4.zip
remove a few C++-isms where they did not buy any convenience anyway
text data bss dec hex filename 182372 2624 2320 187316 2dbb4 abrt.t2/abrt-0.0.8.5/src/Daemon/.libs/abrtd 180635 2584 1968 185187 2d363 abrt.t3/abrt-0.0.8.5/src/Daemon/.libs/abrtd 34110 1340 768 36218 8d7a abrt.t2/abrt-0.0.8.5/src/CLI/.libs/abrt-cli 30202 1292 224 31718 7be6 abrt.t3/abrt-0.0.8.5/src/CLI/.libs/abrt-cli 22116 1688 376 24180 5e74 abrt.t2/abrt-0.0.8.5/src/Applet/.libs/abrt-applet 21254 1648 88 22990 59ce abrt.t3/abrt-0.0.8.5/src/Applet/.libs/abrt-applet Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'src/Daemon')
-rw-r--r--src/Daemon/CommLayerServerSocket.cpp6
-rw-r--r--src/Daemon/CrashWatcher.cpp2
-rw-r--r--src/Daemon/Daemon.cpp1
-rw-r--r--src/Daemon/PluginManager.cpp15
4 files changed, 8 insertions, 16 deletions
diff --git a/src/Daemon/CommLayerServerSocket.cpp b/src/Daemon/CommLayerServerSocket.cpp
index b643aaa9..6b62928b 100644
--- a/src/Daemon/CommLayerServerSocket.cpp
+++ b/src/Daemon/CommLayerServerSocket.cpp
@@ -1,7 +1,5 @@
#include <sys/socket.h>
#include <sys/un.h>
-#include <iostream>
-#include <sstream>
#include "abrtlib.h"
#include "CommLayerInner.h"
#include "ABRTException.h"
@@ -44,9 +42,7 @@ std::string CCommLayerServerSocket::GetSenderUID(int pSenderSocket)
{
throw CABRTException(EXCEP_ERROR, "CCommLayerServerSocket::GetSenderUID(): Error can get sender uid.");
}
- std::stringstream ss;
- ss << creds.uid;
- return ss.str();
+ return to_string(creds.uid);
}
gboolean CCommLayerServerSocket::client_socket_cb(GIOChannel *source, GIOCondition condition, gpointer data)
diff --git a/src/Daemon/CrashWatcher.cpp b/src/Daemon/CrashWatcher.cpp
index 826dc9e6..5cc9dc74 100644
--- a/src/Daemon/CrashWatcher.cpp
+++ b/src/Daemon/CrashWatcher.cpp
@@ -17,8 +17,6 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#include <iostream>
-#include <sstream>
#include "abrtlib.h"
#include "Daemon.h"
#include "ABRTException.h"
diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp
index 70f471c4..3c486279 100644
--- a/src/Daemon/Daemon.cpp
+++ b/src/Daemon/Daemon.cpp
@@ -21,7 +21,6 @@
#include <sys/inotify.h>
#include <glib.h>
#include <pthread.h>
-#include <iostream>
#include <string>
#if HAVE_CONFIG_H
#include <config.h>
diff --git a/src/Daemon/PluginManager.cpp b/src/Daemon/PluginManager.cpp
index be14f4ba..a36d5a85 100644
--- a/src/Daemon/PluginManager.cpp
+++ b/src/Daemon/PluginManager.cpp
@@ -103,17 +103,16 @@ bool LoadPluginSettings(const std::string& pPath, map_plugin_settings_t& pSettin
*/
static bool SavePluginSettings(const std::string& pPath, const map_plugin_settings_t& pSettings)
{
- std::ofstream fOut;
- fOut.open(pPath.c_str());
- if (fOut.is_open())
+ FILE* fOut = fopen(pPath.c_str(), "w");
+ if (fOut)
{
- fOut << "# Settings were written by abrt." << std::endl;
- map_plugin_settings_t::const_iterator it;
- for (it = pSettings.begin(); it != pSettings.end(); it++)
+ fprintf(fOut, "# Settings were written by abrt\n");
+ map_plugin_settings_t::const_iterator it = pSettings.begin();
+ for (; it != pSettings.end(); it++)
{
- fOut << it->first << " = " << it->second << std::endl;
+ fprintf(fOut, "%s = %s\n", it->first.c_str(), it->second.c_str());
}
- fOut.close();
+ fclose(fOut);
return true;
}
return false;