Mercurial > pidgin
comparison libpurple/protocols/msn/msg.c @ 25237:401f548e3544
propagate from branch 'im.pidgin.pidgin' (head df6eba32e5b6b34d7483cbfb7e9f2e4c836ac35f)
to branch 'org.darkrain42.pidgin.buddy-add' (head 6831808999a270f8c1a128c7430a73d3dc0bfae2)
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Sun, 21 Dec 2008 18:32:37 +0000 |
parents | c09a647fd538 |
children | b0e069922896 |
comparison
equal
deleted
inserted
replaced
25172:125cac3e24ee | 25237:401f548e3544 |
---|---|
229 | 229 |
230 for (cur = elems; *cur != NULL; cur++) | 230 for (cur = elems; *cur != NULL; cur++) |
231 { | 231 { |
232 const char *key, *value; | 232 const char *key, *value; |
233 | 233 |
234 /* If this line starts with whitespace, it's been folded from the | |
235 previous line and won't have ':'. */ | |
236 if ((**cur == ' ') || (**cur == '\t')) { | |
237 tokens = g_strsplit(g_strchug(*cur), "=\"", 2); | |
238 key = tokens[0]; | |
239 value = tokens[1]; | |
240 | |
241 /* The only one I care about is 'boundary' (which is folded from | |
242 the key 'Content-Type'), so only process that. */ | |
243 if (!strcmp(key, "boundary")) { | |
244 char *end = strchr(value, '\"'); | |
245 *end = '\0'; | |
246 msn_message_set_attr(msg, key, value); | |
247 } | |
248 | |
249 g_strfreev(tokens); | |
250 continue; | |
251 } | |
252 | |
234 tokens = g_strsplit(*cur, ": ", 2); | 253 tokens = g_strsplit(*cur, ": ", 2); |
235 | 254 |
236 key = tokens[0]; | 255 key = tokens[0]; |
237 value = tokens[1]; | 256 value = tokens[1]; |
238 | 257 |