comparison libpurple/connection.c @ 21423:375d10e84c4b

Consensus on #pidgin is that certificate errors and AUTHENTICATION_IMPOSSIBLE (which occurs, for example, when the server and Pidgin speak no common auth method on xmpp) should be fatal. This leaves us with exactly one non-fatal condition: network errors.
author Will Thompson <will.thompson@collabora.co.uk>
date Sun, 11 Nov 2007 21:22:12 +0000
parents 56a608b80fda
children ba061949650c
comparison
equal deleted inserted replaced
21422:56a608b80fda 21423:375d10e84c4b
576 purple_connection_error_is_fatal (PurpleConnectionError reason) 576 purple_connection_error_is_fatal (PurpleConnectionError reason)
577 { 577 {
578 switch (reason) 578 switch (reason)
579 { 579 {
580 case PURPLE_CONNECTION_ERROR_NETWORK_ERROR: 580 case PURPLE_CONNECTION_ERROR_NETWORK_ERROR:
581 return FALSE;
582 case PURPLE_CONNECTION_ERROR_INVALID_USERNAME:
583 case PURPLE_CONNECTION_ERROR_INCORRECT_PASSWORD:
584 case PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED:
581 case PURPLE_CONNECTION_ERROR_AUTHENTICATION_IMPOSSIBLE: 585 case PURPLE_CONNECTION_ERROR_AUTHENTICATION_IMPOSSIBLE:
586 case PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT:
587 case PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR:
588 case PURPLE_CONNECTION_ERROR_NAME_IN_USE:
589 case PURPLE_CONNECTION_ERROR_INVALID_SETTINGS:
590 case PURPLE_CONNECTION_ERROR_OTHER_ERROR:
582 case PURPLE_CONNECTION_ERROR_CERT_NOT_PROVIDED: 591 case PURPLE_CONNECTION_ERROR_CERT_NOT_PROVIDED:
583 case PURPLE_CONNECTION_ERROR_CERT_UNTRUSTED: 592 case PURPLE_CONNECTION_ERROR_CERT_UNTRUSTED:
584 case PURPLE_CONNECTION_ERROR_CERT_EXPIRED: 593 case PURPLE_CONNECTION_ERROR_CERT_EXPIRED:
585 case PURPLE_CONNECTION_ERROR_CERT_NOT_ACTIVATED: 594 case PURPLE_CONNECTION_ERROR_CERT_NOT_ACTIVATED:
586 case PURPLE_CONNECTION_ERROR_CERT_HOSTNAME_MISMATCH: 595 case PURPLE_CONNECTION_ERROR_CERT_HOSTNAME_MISMATCH:
587 case PURPLE_CONNECTION_ERROR_CERT_FINGERPRINT_MISMATCH: 596 case PURPLE_CONNECTION_ERROR_CERT_FINGERPRINT_MISMATCH:
588 case PURPLE_CONNECTION_ERROR_CERT_SELF_SIGNED: 597 case PURPLE_CONNECTION_ERROR_CERT_SELF_SIGNED:
589 case PURPLE_CONNECTION_ERROR_CERT_OTHER_ERROR: 598 case PURPLE_CONNECTION_ERROR_CERT_OTHER_ERROR:
590 return FALSE;
591 case PURPLE_CONNECTION_ERROR_INVALID_USERNAME:
592 case PURPLE_CONNECTION_ERROR_INCORRECT_PASSWORD:
593 case PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED:
594 case PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT:
595 case PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR:
596 case PURPLE_CONNECTION_ERROR_NAME_IN_USE:
597 case PURPLE_CONNECTION_ERROR_INVALID_SETTINGS:
598 case PURPLE_CONNECTION_ERROR_OTHER_ERROR:
599 return TRUE; 599 return TRUE;
600 default: 600 default:
601 g_return_val_if_reached(TRUE); 601 g_return_val_if_reached(TRUE);
602 } 602 }
603 } 603 }