Mercurial > pidgin
comparison libpurple/connection.c @ 22041:da0b37abe4bd
Adjust some network error fatalities and things
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Tue, 08 Jan 2008 03:03:15 +0000 |
parents | fb8ab2490ac4 |
children | 7553cbc95504 |
comparison
equal
deleted
inserted
replaced
22040:72712558e2be | 22041:da0b37abe4bd |
---|---|
540 { | 540 { |
541 PurpleConnectionError reason; | 541 PurpleConnectionError reason; |
542 | 542 |
543 switch (ssl_error) { | 543 switch (ssl_error) { |
544 case PURPLE_SSL_HANDSHAKE_FAILED: | 544 case PURPLE_SSL_HANDSHAKE_FAILED: |
545 reason = PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR; | |
546 break; | |
545 case PURPLE_SSL_CONNECT_FAILED: | 547 case PURPLE_SSL_CONNECT_FAILED: |
546 reason = PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR; | 548 reason = PURPLE_CONNECTION_ERROR_NETWORK_ERROR; |
547 break; | 549 break; |
548 case PURPLE_SSL_CERTIFICATE_INVALID: | 550 case PURPLE_SSL_CERTIFICATE_INVALID: |
549 /* TODO: maybe PURPLE_SSL_* should be more specific? */ | 551 /* TODO: maybe PURPLE_SSL_* should be more specific? */ |
550 reason = PURPLE_CONNECTION_ERROR_CERT_OTHER_ERROR; | 552 reason = PURPLE_CONNECTION_ERROR_CERT_OTHER_ERROR: |
551 break; | 553 break; |
552 default: | 554 default: |
553 g_assert_not_reached (); | 555 g_assert_not_reached (); |
554 reason = PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR; | 556 reason = PURPLE_CONNECTION_ERROR_CERT_OTHER_ERROR: |
555 } | 557 } |
556 | 558 |
557 purple_connection_error_reason (gc, reason, | 559 purple_connection_error_reason (gc, reason, |
558 purple_ssl_strerror(ssl_error)); | 560 purple_ssl_strerror(ssl_error)); |
559 } | 561 } |
562 purple_connection_error_is_fatal (PurpleConnectionError reason) | 564 purple_connection_error_is_fatal (PurpleConnectionError reason) |
563 { | 565 { |
564 switch (reason) | 566 switch (reason) |
565 { | 567 { |
566 case PURPLE_CONNECTION_ERROR_NETWORK_ERROR: | 568 case PURPLE_CONNECTION_ERROR_NETWORK_ERROR: |
569 case PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR: | |
567 return FALSE; | 570 return FALSE; |
568 case PURPLE_CONNECTION_ERROR_INVALID_USERNAME: | 571 case PURPLE_CONNECTION_ERROR_INVALID_USERNAME: |
569 case PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED: | 572 case PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED: |
570 case PURPLE_CONNECTION_ERROR_AUTHENTICATION_IMPOSSIBLE: | 573 case PURPLE_CONNECTION_ERROR_AUTHENTICATION_IMPOSSIBLE: |
571 case PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT: | 574 case PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT: |
572 case PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR: | |
573 case PURPLE_CONNECTION_ERROR_NAME_IN_USE: | 575 case PURPLE_CONNECTION_ERROR_NAME_IN_USE: |
574 case PURPLE_CONNECTION_ERROR_INVALID_SETTINGS: | 576 case PURPLE_CONNECTION_ERROR_INVALID_SETTINGS: |
575 case PURPLE_CONNECTION_ERROR_OTHER_ERROR: | 577 case PURPLE_CONNECTION_ERROR_OTHER_ERROR: |
576 case PURPLE_CONNECTION_ERROR_CERT_NOT_PROVIDED: | 578 case PURPLE_CONNECTION_ERROR_CERT_NOT_PROVIDED: |
577 case PURPLE_CONNECTION_ERROR_CERT_UNTRUSTED: | 579 case PURPLE_CONNECTION_ERROR_CERT_UNTRUSTED: |