Mercurial > pidgin
annotate src/protocols/msn/error.c @ 5943:a4f2aba0848d
[gaim-migrate @ 6384]
This should fix corruption in the blist, accounts, and pounces when some
protocol plugins cannot load. Some parts of gaim now use the new unique
Plugin or Protocol Plugin IDs, while some still use the old protocol
numbers. Accounts kind of used both, and when prpls were missing, it had
trouble finding accounts. It would find the names, even without mapping the
protocol numbers to IDs, and any duplicate accounts would get nuked. That
would then affect pounce saving. Anyhow, long story short (well, it's
already long, too late for that), this should fix all that mess. And
introduce new mess, but hopefully temporary mess.
committer: Tailor Script <tailor@pidgin.im>
| author | Christian Hammond <chipx86@chipx86.com> |
|---|---|
| date | Mon, 23 Jun 2003 02:00:15 +0000 |
| parents | ad445074d239 |
| children | b7e113a59b51 |
| rev | line source |
|---|---|
| 5309 | 1 /** |
| 2 * @file error.c Error functions | |
| 3 * | |
| 4 * gaim | |
| 5 * | |
| 6 * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org> | |
| 7 * | |
| 8 * This program is free software; you can redistribute it and/or modify | |
| 9 * it under the terms of the GNU General Public License as published by | |
| 10 * the Free Software Foundation; either version 2 of the License, or | |
| 11 * (at your option) any later version. | |
| 12 * | |
| 13 * This program is distributed in the hope that it will be useful, | |
| 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 16 * GNU General Public License for more details. | |
| 17 * | |
| 18 * You should have received a copy of the GNU General Public License | |
| 19 * along with this program; if not, write to the Free Software | |
| 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 21 */ | |
| 22 #include "msn.h" | |
|
5436
ad445074d239
[gaim-migrate @ 5818]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
23 #include "error.h" |
| 5309 | 24 |
| 25 const char * | |
| 26 msn_error_get_text(unsigned int type) | |
| 27 { | |
| 28 static char msg[MSN_BUF_LEN]; | |
| 29 | |
| 30 switch (type) { | |
| 31 case 200: | |
| 32 g_snprintf(msg, sizeof(msg), | |
| 33 _("Syntax Error (probably a Gaim bug)")); | |
| 34 break; | |
| 35 case 201: | |
| 36 g_snprintf(msg, sizeof(msg), | |
| 37 _("Invalid Parameter (probably a Gaim bug)")); | |
| 38 break; | |
| 39 case 205: | |
| 40 g_snprintf(msg, sizeof(msg), _("Invalid User")); | |
| 41 break; | |
| 42 case 206: | |
| 43 g_snprintf(msg, sizeof(msg), | |
| 44 _("Fully Qualified Domain Name missing")); | |
| 45 break; | |
| 46 case 207: | |
| 47 g_snprintf(msg, sizeof(msg), _("Already Login")); | |
| 48 break; | |
| 49 case 208: | |
| 50 g_snprintf(msg, sizeof(msg), _("Invalid Username")); | |
| 51 break; | |
| 52 case 209: | |
| 53 g_snprintf(msg, sizeof(msg), _("Invalid Friendly Name")); | |
| 54 break; | |
| 55 case 210: | |
| 56 g_snprintf(msg, sizeof(msg), _("List Full")); | |
| 57 break; | |
| 58 case 215: | |
| 59 g_snprintf(msg, sizeof(msg), _("Already there")); | |
| 60 break; | |
| 61 case 216: | |
| 62 g_snprintf(msg, sizeof(msg), _("Not on list")); | |
| 63 break; | |
| 64 case 217: | |
| 65 g_snprintf(msg, sizeof(msg), _("User is offline")); | |
| 66 break; | |
| 67 case 218: | |
| 68 g_snprintf(msg, sizeof(msg), _("Already in the mode")); | |
| 69 break; | |
| 70 case 219: | |
| 71 g_snprintf(msg, sizeof(msg), _("Already in opposite list")); | |
| 72 break; | |
| 73 case 231: | |
| 74 g_snprintf(msg, sizeof(msg), | |
| 75 _("Tried to add a contact to a group " | |
| 76 "that doesn't exist")); | |
| 77 break; | |
| 78 case 280: | |
| 79 g_snprintf(msg, sizeof(msg), _("Switchboard failed")); | |
| 80 break; | |
| 81 case 281: | |
| 82 g_snprintf(msg, sizeof(msg), _("Notify Transfer failed")); | |
| 83 break; | |
| 84 | |
| 85 case 300: | |
| 86 g_snprintf(msg, sizeof(msg), _("Required fields missing")); | |
| 87 break; | |
| 88 case 302: | |
| 89 g_snprintf(msg, sizeof(msg), _("Not logged in")); | |
| 90 break; | |
| 91 | |
| 92 case 500: | |
| 93 g_snprintf(msg, sizeof(msg), _("Internal server error")); | |
| 94 break; | |
| 95 case 501: | |
| 96 g_snprintf(msg, sizeof(msg), _("Database server error")); | |
| 97 break; | |
| 98 case 510: | |
| 99 g_snprintf(msg, sizeof(msg), _("File operation error")); | |
| 100 break; | |
| 101 case 520: | |
| 102 g_snprintf(msg, sizeof(msg), _("Memory allocation error")); | |
| 103 break; | |
| 104 case 540: | |
| 105 g_snprintf(msg, sizeof(msg), _("Wrong CHL value sent to server")); | |
| 106 break; | |
| 107 | |
| 108 case 600: | |
| 109 g_snprintf(msg, sizeof(msg), _("Server busy")); | |
| 110 break; | |
| 111 case 601: | |
| 112 g_snprintf(msg, sizeof(msg), _("Server unavailable")); | |
| 113 break; | |
| 114 case 602: | |
| 115 g_snprintf(msg, sizeof(msg), _("Peer Notification server down")); | |
| 116 break; | |
| 117 case 603: | |
| 118 g_snprintf(msg, sizeof(msg), _("Database connect error")); | |
| 119 break; | |
| 120 case 604: | |
| 121 g_snprintf(msg, sizeof(msg), | |
| 122 _("Server is going down (abandon ship)")); | |
| 123 break; | |
| 124 | |
| 125 case 707: | |
| 126 g_snprintf(msg, sizeof(msg), _("Error creating connection")); | |
| 127 break; | |
| 128 case 710: | |
| 129 g_snprintf(msg, sizeof(msg), | |
| 130 _("CVR parameters are either unknown or not allowed")); | |
| 131 break; | |
| 132 case 711: | |
| 133 g_snprintf(msg, sizeof(msg), _("Unable to write")); | |
| 134 break; | |
| 135 case 712: | |
| 136 g_snprintf(msg, sizeof(msg), _("Session overload")); | |
| 137 break; | |
| 138 case 713: | |
| 139 g_snprintf(msg, sizeof(msg), _("User is too active")); | |
| 140 break; | |
| 141 case 714: | |
| 142 g_snprintf(msg, sizeof(msg), _("Too many sessions")); | |
| 143 break; | |
| 144 case 715: | |
| 145 g_snprintf(msg, sizeof(msg), _("Not expected")); | |
| 146 break; | |
| 147 case 717: | |
| 148 g_snprintf(msg, sizeof(msg), _("Bad friend file")); | |
| 149 break; | |
| 150 | |
| 151 case 911: | |
| 152 g_snprintf(msg, sizeof(msg), _("Authentication failed")); | |
| 153 break; | |
| 154 case 913: | |
| 155 g_snprintf(msg, sizeof(msg), _("Not allowed when offline")); | |
| 156 break; | |
| 157 case 920: | |
| 158 g_snprintf(msg, sizeof(msg), _("Not accepting new users")); | |
| 159 break; | |
| 160 case 924: | |
| 161 g_snprintf(msg, sizeof(msg), | |
| 162 _("Passport account not yet verified")); | |
| 163 break; | |
| 164 | |
| 165 default: | |
| 166 g_snprintf(msg, sizeof(msg), _("Unknown Error Code %d"), type); | |
| 167 break; | |
| 168 } | |
| 169 | |
| 170 return msg; | |
| 171 } | |
| 172 | |
| 173 void | |
|
5436
ad445074d239
[gaim-migrate @ 5818]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
174 msn_error_handle(MsnSession *session, unsigned int type) |
| 5309 | 175 { |
| 176 const char *text; | |
| 177 | |
| 178 text = msn_error_get_text(type); | |
| 179 | |
|
5436
ad445074d239
[gaim-migrate @ 5818]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
180 gaim_notify_error(session->account->gc, NULL, text, NULL); |
| 5309 | 181 } |
