summaryrefslogtreecommitdiff
authoralwin <alwin>2004-07-19 13:25:12 (UTC)
committer alwin <alwin>2004-07-19 13:25:12 (UTC)
commit1397c4f0801d4bf1581c26e466453ba65f1b4261 (patch) (side-by-side diff)
treedd57fbf32ca9371d77ae0a90aa564f8b07779a3f
parentf35e69d020bdce078e2fc11f3a5298118a33f346 (diff)
downloadopie-1397c4f0801d4bf1581c26e466453ba65f1b4261.zip
opie-1397c4f0801d4bf1581c26e466453ba65f1b4261.tar.gz
opie-1397c4f0801d4bf1581c26e466453ba65f1b4261.tar.bz2
block SIGPIPE global 'cause we can not satisfy it inside libetpan
itself.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/opiemail.cpp30
-rw-r--r--noncore/net/mail/opiemail.h3
2 files changed, 25 insertions, 8 deletions
diff --git a/noncore/net/mail/opiemail.cpp b/noncore/net/mail/opiemail.cpp
index 5399c3c..2f87e44 100644
--- a/noncore/net/mail/opiemail.cpp
+++ b/noncore/net/mail/opiemail.cpp
@@ -20,2 +20,5 @@
+/* UNIX */
+#include <signal.h>
+
using namespace Opie::Core;
@@ -25,2 +28,3 @@ OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags )
{
+ setup_signalblocking();
settings = new Settings();
@@ -35,2 +39,12 @@ OpieMail::~OpieMail()
+void OpieMail::setup_signalblocking()
+{
+ /* for networking we must block SIGPIPE and Co. */
+ struct sigaction blocking_action,temp_action;
+ blocking_action.sa_handler = SIG_IGN;
+ sigemptyset(&(blocking_action.sa_mask));
+ blocking_action.sa_flags = 0;
+ sigaction(SIGPIPE,&blocking_action,&temp_action);
+}
+
void OpieMail::appMessage(const QCString &msg, const QByteArray &data)
@@ -72,3 +86,3 @@ void OpieMail::slotComposeMail()
{
- odebug << "Compose Mail" << oendl;
+ odebug << "Compose Mail" << oendl;
slotwriteMail(0l,0l);
@@ -78,3 +92,3 @@ void OpieMail::slotSendQueued()
{
- odebug << "Send Queued" << oendl;
+ odebug << "Send Queued" << oendl;
SMTPaccount *smtp = 0;
@@ -125,3 +139,3 @@ void OpieMail::slotSearchMails()
{
- odebug << "Search Mails" << oendl;
+ odebug << "Search Mails" << oendl;
}
@@ -136,3 +150,3 @@ void OpieMail::slotEditAccounts()
{
- odebug << "Edit Accounts" << oendl;
+ odebug << "Edit Accounts" << oendl;
EditAccounts eaDialog( settings, this, 0, true, WStyle_ContextHelp );
@@ -185,3 +199,3 @@ void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int )
if (button!=2) {return;}
- odebug << "Event right/hold" << oendl;
+ odebug << "Event right/hold" << oendl;
if (!item) return;
@@ -209,6 +223,6 @@ void OpieMail::slotShowFolders( bool show )
{
- odebug << "Show Folders" << oendl;
+ odebug << "Show Folders" << oendl;
if ( show && folderView->isHidden() )
{
- odebug << "-> showing" << oendl;
+ odebug << "-> showing" << oendl;
folderView->show();
@@ -217,3 +231,3 @@ void OpieMail::slotShowFolders( bool show )
{
- odebug << "-> hiding" << oendl;
+ odebug << "-> hiding" << oendl;
folderView->hide();
diff --git a/noncore/net/mail/opiemail.h b/noncore/net/mail/opiemail.h
index b93bd60..3d25b3d 100644
--- a/noncore/net/mail/opiemail.h
+++ b/noncore/net/mail/opiemail.h
@@ -36,2 +36,5 @@ protected slots:
+protected:
+ void setup_signalblocking();
+
private: