Mercurial > pidgin
comparison libpurple/protocols/jabber/parser.c @ 29564:9d1794da1d10
jabber: Connected again; checked section 5.4.5 of the bis.
"The minor version number MUST be ignored by an entity with a smaller
minor version number"
I really need to keep a copy of all the XMPP specs on my laptop.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Wed, 10 Mar 2010 01:25:24 +0000 |
parents | 08c29a5c452a |
children | 6e598ca344b3 |
comparison
equal
deleted
inserted
replaced
29563:08c29a5c452a | 29564:9d1794da1d10 |
---|---|
54 const char *dot = strchr(attrib, '.'); | 54 const char *dot = strchr(attrib, '.'); |
55 | 55 |
56 js->protocol_version.major = atoi(attrib); | 56 js->protocol_version.major = atoi(attrib); |
57 js->protocol_version.minor = dot ? atoi(dot + 1) : 0; | 57 js->protocol_version.minor = dot ? atoi(dot + 1) : 0; |
58 | 58 |
59 /* TODO: Check this against the spec; I'm not sure if the check | 59 if (js->protocol_version.major > 1) |
60 * against minor is accurate. | 60 /* TODO: Send <unsupported-version/> error */ |
61 */ | |
62 if (js->protocol_version.major > 1 || (js->protocol_version == 1 && js->protocol_version.minor > 0)) | |
63 purple_connection_error_reason(js->gc, | 61 purple_connection_error_reason(js->gc, |
64 PURPLE_CONNECTION_ERROR_AUTHENTICATION_IMPOSSIBLE, | 62 PURPLE_CONNECTION_ERROR_AUTHENTICATION_IMPOSSIBLE, |
65 _("XMPP Version Mismatch")); | 63 _("XMPP Version Mismatch")); |
66 | 64 |
67 if (js->protocol_version.major == 0 && js->protocol_version.minor != 9) { | 65 if (js->protocol_version.major == 0 && js->protocol_version.minor != 9) { |