-rw-r--r-- | noncore/net/mail/opiemail.cpp | 30 | ||||
-rw-r--r-- | noncore/net/mail/opiemail.h | 3 |
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 @@ | |||
20 | 20 | ||
21 | /* UNIX */ | ||
22 | #include <signal.h> | ||
23 | |||
21 | using namespace Opie::Core; | 24 | using namespace Opie::Core; |
@@ -25,2 +28,3 @@ OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags ) | |||
25 | { | 28 | { |
29 | setup_signalblocking(); | ||
26 | settings = new Settings(); | 30 | settings = new Settings(); |
@@ -35,2 +39,12 @@ OpieMail::~OpieMail() | |||
35 | 39 | ||
40 | void OpieMail::setup_signalblocking() | ||
41 | { | ||
42 | /* for networking we must block SIGPIPE and Co. */ | ||
43 | struct sigaction blocking_action,temp_action; | ||
44 | blocking_action.sa_handler = SIG_IGN; | ||
45 | sigemptyset(&(blocking_action.sa_mask)); | ||
46 | blocking_action.sa_flags = 0; | ||
47 | sigaction(SIGPIPE,&blocking_action,&temp_action); | ||
48 | } | ||
49 | |||
36 | void OpieMail::appMessage(const QCString &msg, const QByteArray &data) | 50 | void OpieMail::appMessage(const QCString &msg, const QByteArray &data) |
@@ -72,3 +86,3 @@ void OpieMail::slotComposeMail() | |||
72 | { | 86 | { |
73 | odebug << "Compose Mail" << oendl; | 87 | odebug << "Compose Mail" << oendl; |
74 | slotwriteMail(0l,0l); | 88 | slotwriteMail(0l,0l); |
@@ -78,3 +92,3 @@ void OpieMail::slotSendQueued() | |||
78 | { | 92 | { |
79 | odebug << "Send Queued" << oendl; | 93 | odebug << "Send Queued" << oendl; |
80 | SMTPaccount *smtp = 0; | 94 | SMTPaccount *smtp = 0; |
@@ -125,3 +139,3 @@ void OpieMail::slotSearchMails() | |||
125 | { | 139 | { |
126 | odebug << "Search Mails" << oendl; | 140 | odebug << "Search Mails" << oendl; |
127 | } | 141 | } |
@@ -136,3 +150,3 @@ void OpieMail::slotEditAccounts() | |||
136 | { | 150 | { |
137 | odebug << "Edit Accounts" << oendl; | 151 | odebug << "Edit Accounts" << oendl; |
138 | EditAccounts eaDialog( settings, this, 0, true, WStyle_ContextHelp ); | 152 | EditAccounts eaDialog( settings, this, 0, true, WStyle_ContextHelp ); |
@@ -185,3 +199,3 @@ void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) | |||
185 | if (button!=2) {return;} | 199 | if (button!=2) {return;} |
186 | odebug << "Event right/hold" << oendl; | 200 | odebug << "Event right/hold" << oendl; |
187 | if (!item) return; | 201 | if (!item) return; |
@@ -209,6 +223,6 @@ void OpieMail::slotShowFolders( bool show ) | |||
209 | { | 223 | { |
210 | odebug << "Show Folders" << oendl; | 224 | odebug << "Show Folders" << oendl; |
211 | if ( show && folderView->isHidden() ) | 225 | if ( show && folderView->isHidden() ) |
212 | { | 226 | { |
213 | odebug << "-> showing" << oendl; | 227 | odebug << "-> showing" << oendl; |
214 | folderView->show(); | 228 | folderView->show(); |
@@ -217,3 +231,3 @@ void OpieMail::slotShowFolders( bool show ) | |||
217 | { | 231 | { |
218 | odebug << "-> hiding" << oendl; | 232 | odebug << "-> hiding" << oendl; |
219 | folderView->hide(); | 233 | 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: | |||
36 | 36 | ||
37 | protected: | ||
38 | void setup_signalblocking(); | ||
39 | |||
37 | private: | 40 | private: |