-rw-r--r-- | kmicromail/editaccounts.cpp | 24 | ||||
-rw-r--r-- | kmicromail/libetpan/tools/mailstream_socket.c | 2 | ||||
-rw-r--r-- | kmicromail/libmailwrapper/smtpwrapper.cpp | 8 |
3 files changed, 20 insertions, 14 deletions
diff --git a/kmicromail/editaccounts.cpp b/kmicromail/editaccounts.cpp index f1075c0..49049f6 100644 --- a/kmicromail/editaccounts.cpp +++ b/kmicromail/editaccounts.cpp | |||
@@ -330,7 +330,7 @@ IMAPconfig::IMAPconfig( IMAPaccount *account, QWidget *parent, const char *name, | |||
330 | { | 330 | { |
331 | data = account; | 331 | data = account; |
332 | 332 | ||
333 | fillValues(); | 333 | //fillValues(); |
334 | 334 | ||
335 | connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); | 335 | connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); |
336 | ComboBox1->insertItem( "Only if available", 0 ); | 336 | ComboBox1->insertItem( "Only if available", 0 ); |
@@ -338,7 +338,8 @@ IMAPconfig::IMAPconfig( IMAPaccount *account, QWidget *parent, const char *name, | |||
338 | ComboBox1->insertItem( "Connect on secure port", 2 ); | 338 | ComboBox1->insertItem( "Connect on secure port", 2 ); |
339 | ComboBox1->insertItem( "Run command instead", 3 ); | 339 | ComboBox1->insertItem( "Run command instead", 3 ); |
340 | CommandEdit->hide(); | 340 | CommandEdit->hide(); |
341 | ComboBox1->setCurrentItem( data->ConnectionType() ); | 341 | fillValues(); |
342 | // ComboBox1->setCurrentItem( data->ConnectionType() ); | ||
342 | } | 343 | } |
343 | 344 | ||
344 | void IMAPconfig::slotConnectionToggle( int index ) | 345 | void IMAPconfig::slotConnectionToggle( int index ) |
@@ -409,7 +410,7 @@ POP3config::POP3config( POP3account *account, QWidget *parent, const char *name, | |||
409 | : POP3configUI( parent, name, modal, flags ) | 410 | : POP3configUI( parent, name, modal, flags ) |
410 | { | 411 | { |
411 | data = account; | 412 | data = account; |
412 | fillValues(); | 413 | //fillValues(); |
413 | 414 | ||
414 | connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); | 415 | connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); |
415 | ComboBox1->insertItem( "Only if available", 0 ); | 416 | ComboBox1->insertItem( "Only if available", 0 ); |
@@ -417,7 +418,8 @@ POP3config::POP3config( POP3account *account, QWidget *parent, const char *name, | |||
417 | ComboBox1->insertItem( "Connect on secure port", 2 ); | 418 | ComboBox1->insertItem( "Connect on secure port", 2 ); |
418 | ComboBox1->insertItem( "Run command instead", 3 ); | 419 | ComboBox1->insertItem( "Run command instead", 3 ); |
419 | CommandEdit->hide(); | 420 | CommandEdit->hide(); |
420 | ComboBox1->setCurrentItem( data->ConnectionType() ); | 421 | fillValues(); |
422 | //ComboBox1->setCurrentItem( data->ConnectionType() ); | ||
421 | } | 423 | } |
422 | 424 | ||
423 | void POP3config::slotConnectionToggle( int index ) | 425 | void POP3config::slotConnectionToggle( int index ) |
@@ -491,7 +493,7 @@ SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, | |||
491 | connect( loginBox, SIGNAL( toggled(bool) ), userLine, SLOT( setEnabled(bool) ) ); | 493 | connect( loginBox, SIGNAL( toggled(bool) ), userLine, SLOT( setEnabled(bool) ) ); |
492 | connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) ); | 494 | connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) ); |
493 | 495 | ||
494 | fillValues(); | 496 | // fillValues(); |
495 | QIconSet icon; | 497 | QIconSet icon; |
496 | //icon = SmallIcon("fileexport"); | 498 | //icon = SmallIcon("fileexport"); |
497 | icon = SmallIcon("fileopen"); | 499 | icon = SmallIcon("fileopen"); |
@@ -500,12 +502,14 @@ SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, | |||
500 | SignaturButton->setMaximumSize ( SignaturButton->sizeHint().height()+4,SignaturButton->sizeHint().height()) ; | 502 | SignaturButton->setMaximumSize ( SignaturButton->sizeHint().height()+4,SignaturButton->sizeHint().height()) ; |
501 | connect( SignaturButton, SIGNAL( clicked() ), this, SLOT( chooseSig() ) ); | 503 | connect( SignaturButton, SIGNAL( clicked() ), this, SLOT( chooseSig() ) ); |
502 | connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); | 504 | connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); |
503 | ComboBox1->insertItem( "Only if available", 0 ); | 505 | ComboBox1->insertItem( "No secure connection, no TLS", 0 ); |
504 | ComboBox1->insertItem( "Always, Negotiated", 1 ); | 506 | ComboBox1->insertItem( "Only if available, try TLS", 1 ); |
505 | ComboBox1->insertItem( "Connect on secure port", 2 ); | 507 | ComboBox1->insertItem( "Always, use TLS", 2 ); |
506 | ComboBox1->insertItem( "Run command instead", 3 ); | 508 | ComboBox1->insertItem( "Connect on secure port (SSL)", 3 ); |
509 | ComboBox1->insertItem( "Run command instead", 4 ); | ||
507 | CommandEdit->hide(); | 510 | CommandEdit->hide(); |
508 | ComboBox1->setCurrentItem( data->ConnectionType() ); | 511 | fillValues(); |
512 | //ComboBox1->setCurrentItem( data->ConnectionType() ); | ||
509 | } | 513 | } |
510 | void SMTPconfig::chooseSig() | 514 | void SMTPconfig::chooseSig() |
511 | { | 515 | { |
diff --git a/kmicromail/libetpan/tools/mailstream_socket.c b/kmicromail/libetpan/tools/mailstream_socket.c index 04a6f48..fd2c758 100644 --- a/kmicromail/libetpan/tools/mailstream_socket.c +++ b/kmicromail/libetpan/tools/mailstream_socket.c | |||
@@ -206,7 +206,7 @@ static ssize_t mailstream_low_socket_write(mailstream_low * s, | |||
206 | // LUTZ next line blocks sometimes | 206 | // LUTZ next line blocks sometimes |
207 | if ( timeout.tv_sec > DEFAULT_NETWORK_TIMEOUT ) | 207 | if ( timeout.tv_sec > DEFAULT_NETWORK_TIMEOUT ) |
208 | timeout.tv_sec = DEFAULT_NETWORK_TIMEOUT; | 208 | timeout.tv_sec = DEFAULT_NETWORK_TIMEOUT; |
209 | fprintf(stderr,"fd %d to secs %d \n", socket_data->fd, timeout.tv_sec ); | 209 | //fprintf(stderr,"fd %d to secs %d \n", socket_data->fd, timeout.tv_sec ); |
210 | r = select(socket_data->fd + 1, NULL, &fds_write, &fds_excp, &timeout); | 210 | r = select(socket_data->fd + 1, NULL, &fds_write, &fds_excp, &timeout); |
211 | if (r < 1) | 211 | if (r < 1) |
212 | return -1; | 212 | return -1; |
diff --git a/kmicromail/libmailwrapper/smtpwrapper.cpp b/kmicromail/libmailwrapper/smtpwrapper.cpp index 5096f67..872a460 100644 --- a/kmicromail/libmailwrapper/smtpwrapper.cpp +++ b/kmicromail/libmailwrapper/smtpwrapper.cpp | |||
@@ -193,7 +193,7 @@ void SMTPwrapper::connect_server() | |||
193 | bool ssl; | 193 | bool ssl; |
194 | uint16_t port; | 194 | uint16_t port; |
195 | ssl = false; | 195 | ssl = false; |
196 | bool try_tls = true; | 196 | bool try_tls = false; |
197 | bool force_tls=false; | 197 | bool force_tls=false; |
198 | QString failuretext = ""; | 198 | QString failuretext = ""; |
199 | 199 | ||
@@ -201,11 +201,13 @@ void SMTPwrapper::connect_server() | |||
201 | return; | 201 | return; |
202 | } | 202 | } |
203 | server = m_SmtpAccount->getServer(); | 203 | server = m_SmtpAccount->getServer(); |
204 | if ( m_SmtpAccount->ConnectionType() == 2 ) { | 204 | if ( m_SmtpAccount->ConnectionType() == 3 ) { |
205 | ssl = true; | 205 | ssl = true; |
206 | try_tls = false; | 206 | try_tls = false; |
207 | } else if (m_SmtpAccount->ConnectionType() == 1) { | 207 | } else if (m_SmtpAccount->ConnectionType() == 2) { |
208 | force_tls = true; | 208 | force_tls = true; |
209 | } else if (m_SmtpAccount->ConnectionType() == 1) { | ||
210 | try_tls = true; | ||
209 | } | 211 | } |
210 | int result = 1; | 212 | int result = 1; |
211 | port = m_SmtpAccount->getPort().toUInt(); | 213 | port = m_SmtpAccount->getPort().toUInt(); |