Mercurial > pidgin.yaz
annotate src/protocols/msn/error.c @ 10306:56cc5d49472b
[gaim-migrate @ 11492]
" Well, I found a bug, and even though I had code to
prevent that crash it seems it did not. So now here is
in a different way, which by the way is more efficient." --Felipe Contreras
(19:35:44) shx: LSchiere: there's a bugfix patch for msn in the tracker if
it interest you ;)
(19:35:59) LSchiere: the one i assigned to nosnilmot just a little bit ago?
(19:36:24) shx: LSchiere: probably
(19:38:25) LSchiere: i just remembered to day is release day
(19:38:51) shx: yeap... so I tought it was important to commit it
also, i rather like being able to compile
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Fri, 03 Dec 2004 00:57:21 +0000 |
parents | ab6636c5a136 |
children | e346a085bb4f |
rev | line source |
---|---|
5309 | 1 /** |
2 * @file error.c Error functions | |
3 * | |
4 * gaim | |
5 * | |
9198
ab6636c5a136
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
8662
diff
changeset
|
6 * Gaim is the legal property of its developers, whose names are too numerous |
ab6636c5a136
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
8662
diff
changeset
|
7 * to list here. Please refer to the COPYRIGHT file distributed with this |
ab6636c5a136
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
8662
diff
changeset
|
8 * source distribution. |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5436
diff
changeset
|
9 * |
5309 | 10 * This program is free software; you can redistribute it and/or modify |
11 * it under the terms of the GNU General Public License as published by | |
12 * the Free Software Foundation; either version 2 of the License, or | |
13 * (at your option) any later version. | |
14 * | |
15 * This program is distributed in the hope that it will be useful, | |
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 * GNU General Public License for more details. | |
19 * | |
20 * You should have received a copy of the GNU General Public License | |
21 * along with this program; if not, write to the Free Software | |
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
23 */ | |
24 #include "msn.h" | |
5436
ad445074d239
[gaim-migrate @ 5818]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
25 #include "error.h" |
5309 | 26 |
27 const char * | |
28 msn_error_get_text(unsigned int type) | |
29 { | |
30 static char msg[MSN_BUF_LEN]; | |
31 | |
32 switch (type) { | |
8569
ee13d1befabe
[gaim-migrate @ 9317]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
33 case 0: |
ee13d1befabe
[gaim-migrate @ 9317]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
34 g_snprintf(msg, sizeof(msg), |
ee13d1befabe
[gaim-migrate @ 9317]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
35 _("Unable to parse message")); |
5309 | 36 case 200: |
37 g_snprintf(msg, sizeof(msg), | |
38 _("Syntax Error (probably a Gaim bug)")); | |
39 break; | |
40 case 201: | |
41 g_snprintf(msg, sizeof(msg), | |
8569
ee13d1befabe
[gaim-migrate @ 9317]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
42 _("Invalid email address")); |
5309 | 43 break; |
44 case 205: | |
8569
ee13d1befabe
[gaim-migrate @ 9317]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
45 g_snprintf(msg, sizeof(msg), _("User does not exist")); |
5309 | 46 break; |
47 case 206: | |
48 g_snprintf(msg, sizeof(msg), | |
49 _("Fully Qualified Domain Name missing")); | |
50 break; | |
51 case 207: | |
7086
0cacce490486
[gaim-migrate @ 7651]
Christian Hammond <chipx86@chipx86.com>
parents:
6887
diff
changeset
|
52 g_snprintf(msg, sizeof(msg), _("Already Logged In")); |
5309 | 53 break; |
54 case 208: | |
55 g_snprintf(msg, sizeof(msg), _("Invalid Username")); | |
56 break; | |
57 case 209: | |
58 g_snprintf(msg, sizeof(msg), _("Invalid Friendly Name")); | |
59 break; | |
60 case 210: | |
61 g_snprintf(msg, sizeof(msg), _("List Full")); | |
62 break; | |
63 case 215: | |
64 g_snprintf(msg, sizeof(msg), _("Already there")); | |
65 break; | |
66 case 216: | |
67 g_snprintf(msg, sizeof(msg), _("Not on list")); | |
68 break; | |
69 case 217: | |
70 g_snprintf(msg, sizeof(msg), _("User is offline")); | |
71 break; | |
72 case 218: | |
73 g_snprintf(msg, sizeof(msg), _("Already in the mode")); | |
74 break; | |
75 case 219: | |
76 g_snprintf(msg, sizeof(msg), _("Already in opposite list")); | |
77 break; | |
6887
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
78 case 223: |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
79 g_snprintf(msg, sizeof(msg), _("Too many groups")); |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
80 break; |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
81 case 224: |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
82 g_snprintf(msg, sizeof(msg), _("Invalid group")); |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
83 break; |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
84 case 225: |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
85 g_snprintf(msg, sizeof(msg), _("User not in group")); |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
86 break; |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
87 case 229: |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
88 g_snprintf(msg, sizeof(msg), _("Group name too long")); |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
89 break; |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
90 case 230: |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
91 g_snprintf(msg, sizeof(msg), _("Cannot remove group zero")); |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
92 break; |
5309 | 93 case 231: |
94 g_snprintf(msg, sizeof(msg), | |
95 _("Tried to add a contact to a group " | |
96 "that doesn't exist")); | |
97 break; | |
98 case 280: | |
99 g_snprintf(msg, sizeof(msg), _("Switchboard failed")); | |
100 break; | |
101 case 281: | |
102 g_snprintf(msg, sizeof(msg), _("Notify Transfer failed")); | |
103 break; | |
104 | |
105 case 300: | |
106 g_snprintf(msg, sizeof(msg), _("Required fields missing")); | |
107 break; | |
6887
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
108 case 301: |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
109 g_snprintf(msg, sizeof(msg), _("Too many hits to a FND")); |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
110 break; |
5309 | 111 case 302: |
112 g_snprintf(msg, sizeof(msg), _("Not logged in")); | |
113 break; | |
114 | |
115 case 500: | |
8255
4de49af535b3
[gaim-migrate @ 8978]
Christian Hammond <chipx86@chipx86.com>
parents:
7086
diff
changeset
|
116 g_snprintf(msg, sizeof(msg), _("Service Temporarily Unavailable")); |
5309 | 117 break; |
118 case 501: | |
119 g_snprintf(msg, sizeof(msg), _("Database server error")); | |
120 break; | |
8255
4de49af535b3
[gaim-migrate @ 8978]
Christian Hammond <chipx86@chipx86.com>
parents:
7086
diff
changeset
|
121 case 502: |
4de49af535b3
[gaim-migrate @ 8978]
Christian Hammond <chipx86@chipx86.com>
parents:
7086
diff
changeset
|
122 g_snprintf(msg, sizeof(msg), _("Command disabled")); |
4de49af535b3
[gaim-migrate @ 8978]
Christian Hammond <chipx86@chipx86.com>
parents:
7086
diff
changeset
|
123 break; |
5309 | 124 case 510: |
125 g_snprintf(msg, sizeof(msg), _("File operation error")); | |
126 break; | |
127 case 520: | |
128 g_snprintf(msg, sizeof(msg), _("Memory allocation error")); | |
129 break; | |
130 case 540: | |
131 g_snprintf(msg, sizeof(msg), _("Wrong CHL value sent to server")); | |
132 break; | |
133 | |
134 case 600: | |
135 g_snprintf(msg, sizeof(msg), _("Server busy")); | |
136 break; | |
137 case 601: | |
138 g_snprintf(msg, sizeof(msg), _("Server unavailable")); | |
139 break; | |
140 case 602: | |
141 g_snprintf(msg, sizeof(msg), _("Peer Notification server down")); | |
142 break; | |
143 case 603: | |
144 g_snprintf(msg, sizeof(msg), _("Database connect error")); | |
145 break; | |
146 case 604: | |
147 g_snprintf(msg, sizeof(msg), | |
148 _("Server is going down (abandon ship)")); | |
149 break; | |
6887
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
150 case 605: |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
151 g_snprintf(msg, sizeof(msg), _("Server unavailable")); |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
152 break; |
5309 | 153 |
154 case 707: | |
155 g_snprintf(msg, sizeof(msg), _("Error creating connection")); | |
156 break; | |
157 case 710: | |
158 g_snprintf(msg, sizeof(msg), | |
159 _("CVR parameters are either unknown or not allowed")); | |
160 break; | |
161 case 711: | |
162 g_snprintf(msg, sizeof(msg), _("Unable to write")); | |
163 break; | |
164 case 712: | |
165 g_snprintf(msg, sizeof(msg), _("Session overload")); | |
166 break; | |
167 case 713: | |
168 g_snprintf(msg, sizeof(msg), _("User is too active")); | |
169 break; | |
170 case 714: | |
171 g_snprintf(msg, sizeof(msg), _("Too many sessions")); | |
172 break; | |
173 case 715: | |
8569
ee13d1befabe
[gaim-migrate @ 9317]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
174 g_snprintf(msg, sizeof(msg), _("Passport not verified")); |
5309 | 175 break; |
176 case 717: | |
177 g_snprintf(msg, sizeof(msg), _("Bad friend file")); | |
178 break; | |
6887
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
179 case 731: |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
180 g_snprintf(msg, sizeof(msg), _("Not expected")); |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
181 break; |
5309 | 182 |
6887
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
183 case 800: |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
184 g_snprintf(msg, sizeof(msg), |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
185 _("Friendly name changes too rapidly")); |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
186 break; |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
187 |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
188 case 910: |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
189 case 912: |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
190 case 918: |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
191 case 919: |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
192 case 921: |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
193 case 922: |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
194 g_snprintf(msg, sizeof(msg), _("Server too busy")); |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
195 break; |
5309 | 196 case 911: |
6887
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
197 case 917: |
5309 | 198 g_snprintf(msg, sizeof(msg), _("Authentication failed")); |
199 break; | |
200 case 913: | |
201 g_snprintf(msg, sizeof(msg), _("Not allowed when offline")); | |
202 break; | |
6887
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
203 case 914: |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
204 case 915: |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
205 case 916: |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
206 g_snprintf(msg, sizeof(msg), _("Server unavailable")); |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
207 break; |
8255
4de49af535b3
[gaim-migrate @ 8978]
Christian Hammond <chipx86@chipx86.com>
parents:
7086
diff
changeset
|
208 case 920: |
5309 | 209 g_snprintf(msg, sizeof(msg), _("Not accepting new users")); |
210 break; | |
8255
4de49af535b3
[gaim-migrate @ 8978]
Christian Hammond <chipx86@chipx86.com>
parents:
7086
diff
changeset
|
211 case 923: |
6887
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
212 g_snprintf(msg, sizeof(msg), |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
213 _("Kids Passport without parental consent")); |
5d48764e711c
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
214 break; |
8255
4de49af535b3
[gaim-migrate @ 8978]
Christian Hammond <chipx86@chipx86.com>
parents:
7086
diff
changeset
|
215 case 924: |
5309 | 216 g_snprintf(msg, sizeof(msg), |
217 _("Passport account not yet verified")); | |
218 break; | |
8255
4de49af535b3
[gaim-migrate @ 8978]
Christian Hammond <chipx86@chipx86.com>
parents:
7086
diff
changeset
|
219 case 928: |
4de49af535b3
[gaim-migrate @ 8978]
Christian Hammond <chipx86@chipx86.com>
parents:
7086
diff
changeset
|
220 g_snprintf(msg, sizeof(msg), _("Bad ticket")); |
4de49af535b3
[gaim-migrate @ 8978]
Christian Hammond <chipx86@chipx86.com>
parents:
7086
diff
changeset
|
221 break; |
5309 | 222 |
223 default: | |
224 g_snprintf(msg, sizeof(msg), _("Unknown Error Code %d"), type); | |
225 break; | |
226 } | |
227 | |
228 return msg; | |
229 } | |
230 | |
231 void | |
5436
ad445074d239
[gaim-migrate @ 5818]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
232 msn_error_handle(MsnSession *session, unsigned int type) |
5309 | 233 { |
8569
ee13d1befabe
[gaim-migrate @ 9317]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
234 char buf[MSN_BUF_LEN]; |
5309 | 235 |
8569
ee13d1befabe
[gaim-migrate @ 9317]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
236 g_snprintf(buf, sizeof(buf), _("MSN Error: %s\n"), |
8662
c47a90a0a3b1
[gaim-migrate @ 9414]
Christian Hammond <chipx86@chipx86.com>
parents:
8569
diff
changeset
|
237 msn_error_get_text(type)); |
5309 | 238 |
8569
ee13d1befabe
[gaim-migrate @ 9317]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
239 gaim_notify_error(session->account->gc, NULL, buf, NULL); |
5309 | 240 } |