comparison libpurple/protocols/novell/novell.c @ 32330:a5b556ac1de5

Rename purple_connection_error_reason to purple_connection_error
author Mark Doliner <mark@kingant.net>
date Sun, 21 Aug 2011 08:00:53 +0000
parents 7c33eaed54e5
children 3322201b446f
comparison
equal deleted inserted replaced
32329:5105d0306b2a 32330:a5b556ac1de5
138 default: 138 default:
139 /* FIXME: There are other reasons login could fail */ 139 /* FIXME: There are other reasons login could fail */
140 reason = PURPLE_CONNECTION_ERROR_NETWORK_ERROR; 140 reason = PURPLE_CONNECTION_ERROR_NETWORK_ERROR;
141 } 141 }
142 142
143 purple_connection_error_reason(gc, reason, err); 143 purple_connection_error(gc, reason, err);
144 g_free(err); 144 g_free(err);
145 } 145 }
146 } 146 }
147 147
148 /* Handle getstatus response*/ 148 /* Handle getstatus response*/
1124 { 1124 {
1125 PurpleConnection *gc = purple_account_get_connection(user->client_data); 1125 PurpleConnection *gc = purple_account_get_connection(user->client_data);
1126 1126
1127 if (_is_disconnect_error(err)) { 1127 if (_is_disconnect_error(err)) {
1128 1128
1129 purple_connection_error_reason(gc, 1129 purple_connection_error(gc,
1130 PURPLE_CONNECTION_ERROR_NETWORK_ERROR, 1130 PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
1131 _("Error communicating with server. Closing connection.")); 1131 _("Error communicating with server. Closing connection."));
1132 return TRUE; 1132 return TRUE;
1133 1133
1134 } 1134 }
1700 rc = nm_process_new_data(user); 1700 rc = nm_process_new_data(user);
1701 if (rc != NM_OK) { 1701 if (rc != NM_OK) {
1702 1702
1703 if (_is_disconnect_error(rc)) { 1703 if (_is_disconnect_error(rc)) {
1704 1704
1705 purple_connection_error_reason(gc, 1705 purple_connection_error(gc,
1706 PURPLE_CONNECTION_ERROR_NETWORK_ERROR, 1706 PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
1707 _("Error communicating with server. Closing connection.")); 1707 _("Error communicating with server. Closing connection."));
1708 } else { 1708 } else {
1709 purple_debug(PURPLE_DEBUG_INFO, "novell", 1709 purple_debug(PURPLE_DEBUG_INFO, "novell",
1710 "Error processing event or response (%d).\n", rc); 1710 "Error processing event or response (%d).\n", rc);
1741 rc = nm_send_login(user, pwd, my_addr, ua, _login_resp_cb, NULL); 1741 rc = nm_send_login(user, pwd, my_addr, ua, _login_resp_cb, NULL);
1742 if (rc == NM_OK) { 1742 if (rc == NM_OK) {
1743 conn->connected = TRUE; 1743 conn->connected = TRUE;
1744 purple_ssl_input_add(gsc, novell_ssl_recv_cb, gc); 1744 purple_ssl_input_add(gsc, novell_ssl_recv_cb, gc);
1745 } else { 1745 } else {
1746 purple_connection_error_reason(gc, 1746 purple_connection_error(gc,
1747 PURPLE_CONNECTION_ERROR_NETWORK_ERROR, 1747 PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
1748 _("Unable to connect")); 1748 _("Unable to connect"));
1749 } 1749 }
1750 1750
1751 purple_connection_update_progress(gc, _("Waiting for response..."), 1751 purple_connection_update_progress(gc, _("Waiting for response..."),
2026 gc = purple_account_get_connection(account); 2026 gc = purple_account_get_connection(account);
2027 if (gc) 2027 if (gc)
2028 { 2028 {
2029 if (!purple_account_get_remember_password(account)) 2029 if (!purple_account_get_remember_password(account))
2030 purple_account_set_password(account, NULL); 2030 purple_account_set_password(account, NULL);
2031 purple_connection_error_reason(gc, 2031 purple_connection_error(gc,
2032 PURPLE_CONNECTION_ERROR_NAME_IN_USE, 2032 PURPLE_CONNECTION_ERROR_NAME_IN_USE,
2033 _("You have signed on from another location")); 2033 _("You have signed on from another location"));
2034 } 2034 }
2035 } 2035 }
2036 2036
2182 /* TODO: Would be nice to prompt if not set! 2182 /* TODO: Would be nice to prompt if not set!
2183 * purple_request_fields(gc, _("Server Address"),...); 2183 * purple_request_fields(gc, _("Server Address"),...);
2184 */ 2184 */
2185 2185
2186 /* ...but for now just error out with a nice message. */ 2186 /* ...but for now just error out with a nice message. */
2187 purple_connection_error_reason(gc, 2187 purple_connection_error(gc,
2188 PURPLE_CONNECTION_ERROR_INVALID_SETTINGS, 2188 PURPLE_CONNECTION_ERROR_INVALID_SETTINGS,
2189 _("Unable to connect to server. Please enter the " 2189 _("Unable to connect to server. Please enter the "
2190 "address of the server to which you wish to connect.")); 2190 "address of the server to which you wish to connect."));
2191 return; 2191 return;
2192 } 2192 }
2211 2211
2212 user->conn->ssl_conn->data = purple_ssl_connect(user->client_data, 2212 user->conn->ssl_conn->data = purple_ssl_connect(user->client_data,
2213 user->conn->addr, user->conn->port, 2213 user->conn->addr, user->conn->port,
2214 novell_ssl_connected_cb, novell_ssl_connect_error, gc); 2214 novell_ssl_connected_cb, novell_ssl_connect_error, gc);
2215 if (user->conn->ssl_conn->data == NULL) { 2215 if (user->conn->ssl_conn->data == NULL) {
2216 purple_connection_error_reason(gc, 2216 purple_connection_error(gc,
2217 PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT, 2217 PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT,
2218 _("SSL support unavailable")); 2218 _("SSL support unavailable"));
2219 } 2219 }
2220 } 2220 }
2221 } 2221 }