comparison src/protocols/oscar/odc.c @ 13986:8a8b4f7f7d99

[gaim-migrate @ 16556] Fix a minor case of accessing something that had been free'd in oscar, and some other minor cleanup. FYI "0" is a valid file descriptor, but it will pretty much always be STDOUT, STDERR or STDIN. But I like to check for -1 anyway, because I'm weird. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 24 Jul 2006 04:27:42 +0000
parents 6c34fbb75bbd
children
comparison
equal deleted inserted replaced
13985:a7b1d2ab9cb0 13986:8a8b4f7f7d99
35 peer_odc_close(PeerConnection *conn) 35 peer_odc_close(PeerConnection *conn)
36 { 36 {
37 const gchar *tmp; 37 const gchar *tmp;
38 38
39 if (conn->disconnect_reason == OSCAR_DISCONNECT_REMOTE_CLOSED) 39 if (conn->disconnect_reason == OSCAR_DISCONNECT_REMOTE_CLOSED)
40 {
41 tmp = _("The remote user has closed the connection."); 40 tmp = _("The remote user has closed the connection.");
42 }
43 else if (conn->disconnect_reason == OSCAR_DISCONNECT_REMOTE_REFUSED) 41 else if (conn->disconnect_reason == OSCAR_DISCONNECT_REMOTE_REFUSED)
44 {
45 tmp = _("The remote user has declined your request."); 42 tmp = _("The remote user has declined your request.");
46 }
47 else if (conn->disconnect_reason == OSCAR_DISCONNECT_LOST_CONNECTION) 43 else if (conn->disconnect_reason == OSCAR_DISCONNECT_LOST_CONNECTION)
48 {
49 tmp = _("Lost connection with the remote user for an unknown reason."); 44 tmp = _("Lost connection with the remote user for an unknown reason.");
50 }
51 else if (conn->disconnect_reason == OSCAR_DISCONNECT_INVALID_DATA) 45 else if (conn->disconnect_reason == OSCAR_DISCONNECT_INVALID_DATA)
52 {
53 tmp = _("Received invalid data on connection with remote user."); 46 tmp = _("Received invalid data on connection with remote user.");
54 }
55 else if (conn->disconnect_reason == OSCAR_DISCONNECT_COULD_NOT_CONNECT) 47 else if (conn->disconnect_reason == OSCAR_DISCONNECT_COULD_NOT_CONNECT)
56 {
57 tmp = _("Could not establish a connection with the remote user."); 48 tmp = _("Could not establish a connection with the remote user.");
58 }
59 else 49 else
60 /* 50 /*
61 * We shouldn't print a message for some disconnect_reasons. 51 * We shouldn't print a message for some disconnect_reasons.
62 * Like OSCAR_DISCONNECT_LOCAL_CLOSED. 52 * Like OSCAR_DISCONNECT_LOCAL_CLOSED.
63 */ 53 */