Mercurial > pidgin.yaz
comparison libpurple/protocols/msn/cmdproc.c @ 31132:33b4ae796648
Rename "attribute" to "header" in a bunch of places. The SLP protocol
is fashioned after HTTP. Well, more accurately after SIP. And these
are generally referred to as headers pretty much everywhere.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 08 Feb 2010 07:41:15 +0000 |
parents | 28485b9ea656 |
children | d827357c6ce9 |
comparison
equal
deleted
inserted
replaced
31131:6376fc7a092e | 31132:33b4ae796648 |
---|---|
244 { | 244 { |
245 MsnMsgTypeCb cb; | 245 MsnMsgTypeCb cb; |
246 const char *messageId = NULL; | 246 const char *messageId = NULL; |
247 | 247 |
248 /* Multi-part messages */ | 248 /* Multi-part messages */ |
249 if ((messageId = msn_message_get_attr(msg, "Message-ID")) != NULL) { | 249 if ((messageId = msn_message_get_header_value(msg, "Message-ID")) != NULL) { |
250 const char *chunk_text = msn_message_get_attr(msg, "Chunks"); | 250 const char *chunk_text = msn_message_get_header_value(msg, "Chunks"); |
251 guint chunk; | 251 guint chunk; |
252 if (chunk_text != NULL) { | 252 if (chunk_text != NULL) { |
253 chunk = strtol(chunk_text, NULL, 10); | 253 chunk = strtol(chunk_text, NULL, 10); |
254 /* 1024 chunks of ~1300 bytes is ~1MB, which seems OK to prevent | 254 /* 1024 chunks of ~1300 bytes is ~1MB, which seems OK to prevent |
255 some random client causing pidgin to hog a ton of memory. | 255 some random client causing pidgin to hog a ton of memory. |
264 } else { | 264 } else { |
265 purple_debug_error("msn", "MessageId '%s' has too many chunks: %d\n", messageId, chunk); | 265 purple_debug_error("msn", "MessageId '%s' has too many chunks: %d\n", messageId, chunk); |
266 } | 266 } |
267 return; | 267 return; |
268 } else { | 268 } else { |
269 chunk_text = msn_message_get_attr(msg, "Chunk"); | 269 chunk_text = msn_message_get_header_value(msg, "Chunk"); |
270 if (chunk_text != NULL) { | 270 if (chunk_text != NULL) { |
271 MsnMessage *first = g_hash_table_lookup(cmdproc->multiparts, messageId); | 271 MsnMessage *first = g_hash_table_lookup(cmdproc->multiparts, messageId); |
272 chunk = strtol(chunk_text, NULL, 10); | 272 chunk = strtol(chunk_text, NULL, 10); |
273 if (first == NULL) { | 273 if (first == NULL) { |
274 purple_debug_error("msn", | 274 purple_debug_error("msn", |