Mercurial > pidgin.yaz
comparison libpurple/protocols/oscar/flap_connection.c @ 27456:fe912af02ff6
Remove trailing periods from short disconnection error messags and remove
newlines between the error description and the g_strerror() output.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 06 Jul 2009 05:29:46 +0000 |
parents | 7054f810b0f9 |
children | f541583e31bd |
comparison
equal
deleted
inserted
replaced
27455:2873ee6a960d | 27456:fe912af02ff6 |
---|---|
467 gchar *tmp; | 467 gchar *tmp; |
468 PurpleConnectionError reason = PURPLE_CONNECTION_ERROR_NETWORK_ERROR; | 468 PurpleConnectionError reason = PURPLE_CONNECTION_ERROR_NETWORK_ERROR; |
469 | 469 |
470 if (conn->disconnect_code == 0x0001) { | 470 if (conn->disconnect_code == 0x0001) { |
471 reason = PURPLE_CONNECTION_ERROR_NAME_IN_USE; | 471 reason = PURPLE_CONNECTION_ERROR_NAME_IN_USE; |
472 tmp = g_strdup(_("You have signed on from another location.")); | 472 tmp = g_strdup(_("You have signed on from another location")); |
473 if (!purple_account_get_remember_password(account)) | 473 if (!purple_account_get_remember_password(account)) |
474 purple_account_set_password(account, NULL); | 474 purple_account_set_password(account, NULL); |
475 } else if (conn->disconnect_reason == OSCAR_DISCONNECT_REMOTE_CLOSED) | 475 } else if (conn->disconnect_reason == OSCAR_DISCONNECT_REMOTE_CLOSED) |
476 tmp = g_strdup(_("Server closed the connection.")); | 476 tmp = g_strdup(_("Server closed the connection")); |
477 else if (conn->disconnect_reason == OSCAR_DISCONNECT_LOST_CONNECTION) | 477 else if (conn->disconnect_reason == OSCAR_DISCONNECT_LOST_CONNECTION) |
478 tmp = g_strdup_printf(_("Lost connection with server:\n%s"), | 478 tmp = g_strdup_printf(_("Lost connection with server: %s"), |
479 conn->error_message); | 479 conn->error_message); |
480 else if (conn->disconnect_reason == OSCAR_DISCONNECT_INVALID_DATA) | 480 else if (conn->disconnect_reason == OSCAR_DISCONNECT_INVALID_DATA) |
481 tmp = g_strdup(_("Received invalid data on connection with server.")); | 481 tmp = g_strdup(_("Received invalid data on connection with server")); |
482 else if (conn->disconnect_reason == OSCAR_DISCONNECT_COULD_NOT_CONNECT) | 482 else if (conn->disconnect_reason == OSCAR_DISCONNECT_COULD_NOT_CONNECT) |
483 tmp = g_strdup_printf(_("Could not establish a connection with the server:\n%s"), | 483 tmp = g_strdup_printf(_("Could not establish a connection with the server: %s"), |
484 conn->error_message); | 484 conn->error_message); |
485 else | 485 else |
486 /* | 486 /* |
487 * We shouldn't print a message for some disconnect_reasons. | 487 * We shouldn't print a message for some disconnect_reasons. |
488 * Like OSCAR_DISCONNECT_LOCAL_CLOSED. | 488 * Like OSCAR_DISCONNECT_LOCAL_CLOSED. |
1051 writelen); | 1051 writelen); |
1052 else | 1052 else |
1053 ret = send(conn->fd, conn->buffer_outgoing->outptr, writelen, 0); | 1053 ret = send(conn->fd, conn->buffer_outgoing->outptr, writelen, 0); |
1054 if (ret <= 0) | 1054 if (ret <= 0) |
1055 { | 1055 { |
1056 if (ret < 0 && ((errno == EAGAIN) || (errno == EWOULDBLOCK))) | 1056 if (ret < 0 && (errno == EAGAIN || errno == EWOULDBLOCK)) |
1057 /* No worries */ | 1057 /* No worries */ |
1058 return; | 1058 return; |
1059 | 1059 |
1060 /* Error! */ | 1060 /* Error! */ |
1061 purple_input_remove(conn->watcher_outgoing); | 1061 purple_input_remove(conn->watcher_outgoing); |