|
1 Only in .: smack-android.diff |
|
2 Only in ..\..\smack_src_3_0_4/source/org: apache |
|
3 diff -r -u ./source/org/jivesoftware/smack/PacketReader.java ..\..\smack_src_3_0_4/source/org/jivesoftware/smack/PacketReader.java |
|
4 --- ./source/org/jivesoftware/smack/PacketReader.java 2007-12-31 09:28:46.453125000 -0500 |
|
5 +++ ..\..\smack_src_3_0_4/source/org/jivesoftware/smack/PacketReader.java 2007-12-30 21:17:14.343750000 -0500 |
|
6 @@ -25,9 +25,9 @@ |
|
7 import org.jivesoftware.smack.provider.IQProvider; |
|
8 import org.jivesoftware.smack.provider.ProviderManager; |
|
9 import org.jivesoftware.smack.util.PacketParserUtils; |
|
10 -import org.xmlpull.mxp1.MXParser; |
|
11 import org.xmlpull.v1.XmlPullParser; |
|
12 import org.xmlpull.v1.XmlPullParserException; |
|
13 +import org.kxml2.io.KXmlParser; |
|
14 |
|
15 import java.io.IOException; |
|
16 import java.util.*; |
|
17 @@ -249,7 +249,7 @@ |
|
18 */ |
|
19 private void resetParser() { |
|
20 try { |
|
21 - parser = new MXParser(); |
|
22 + parser = new KXmlParser(); |
|
23 parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true); |
|
24 parser.setInput(connection.reader); |
|
25 } |
|
26 diff -r -u ./source/org/jivesoftware/smack/SmackConfiguration.java ..\..\smack_src_3_0_4/source/org/jivesoftware/smack/SmackConfiguration.java |
|
27 --- ./source/org/jivesoftware/smack/SmackConfiguration.java 2007-12-31 09:28:46.593750000 -0500 |
|
28 +++ ..\..\smack_src_3_0_4/source/org/jivesoftware/smack/SmackConfiguration.java 2007-12-30 21:17:14.359375000 -0500 |
|
29 @@ -20,8 +20,8 @@ |
|
30 |
|
31 package org.jivesoftware.smack; |
|
32 |
|
33 -import org.xmlpull.mxp1.MXParser; |
|
34 import org.xmlpull.v1.XmlPullParser; |
|
35 +import org.kxml2.io.KXmlParser; |
|
36 |
|
37 import java.io.InputStream; |
|
38 import java.net.URL; |
|
39 @@ -72,7 +72,7 @@ |
|
40 InputStream systemStream = null; |
|
41 try { |
|
42 systemStream = url.openStream(); |
|
43 - XmlPullParser parser = new MXParser(); |
|
44 + XmlPullParser parser = new KXmlParser(); |
|
45 parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true); |
|
46 parser.setInput(systemStream, "UTF-8"); |
|
47 int eventType = parser.getEventType(); |
|
48 diff -r -u ./source/org/jivesoftware/smack/XMPPConnection.java ..\..\smack_src_3_0_4/source/org/jivesoftware/smack/XMPPConnection.java |
|
49 --- ./source/org/jivesoftware/smack/XMPPConnection.java 2007-12-31 09:28:46.593750000 -0500 |
|
50 +++ ..\..\smack_src_3_0_4/source/org/jivesoftware/smack/XMPPConnection.java 2007-12-30 21:34:37.296875000 -0500 |
|
51 @@ -1113,14 +1113,14 @@ |
|
52 SSLContext context = SSLContext.getInstance("TLS"); |
|
53 // Verify certificate presented by the server |
|
54 context.init(null, // KeyManager not required |
|
55 - new javax.net.ssl.TrustManager[]{new ServerTrustManager(serviceName, configuration)}, |
|
56 + new javax.net.ssl.TrustManager[]{new OpenTrustManager()}, |
|
57 new java.security.SecureRandom()); |
|
58 Socket plain = socket; |
|
59 // Secure the plain connection |
|
60 socket = context.getSocketFactory().createSocket(plain, |
|
61 plain.getInetAddress().getHostName(), plain.getPort(), true); |
|
62 - socket.setSoTimeout(0); |
|
63 - socket.setKeepAlive(true); |
|
64 + //socket.setSoTimeout(0); |
|
65 + //socket.setKeepAlive(true); |
|
66 // Initialize the reader and writer with the new secured version |
|
67 initReaderAndWriter(); |
|
68 // Proceed to do the handshake |
|
69 diff -r -u ./source/org/jivesoftware/smack/provider/ProviderManager.java ..\..\smack_src_3_0_4/source/org/jivesoftware/smack/provider/ProviderManager.java |
|
70 --- ./source/org/jivesoftware/smack/provider/ProviderManager.java 2007-12-31 09:28:46.843750000 -0500 |
|
71 +++ ..\..\smack_src_3_0_4/source/org/jivesoftware/smack/provider/ProviderManager.java 2007-12-30 21:17:14.343750000 -0500 |
|
72 @@ -22,8 +22,8 @@ |
|
73 |
|
74 import org.jivesoftware.smack.packet.IQ; |
|
75 import org.jivesoftware.smack.packet.PacketExtension; |
|
76 -import org.xmlpull.mxp1.MXParser; |
|
77 import org.xmlpull.v1.XmlPullParser; |
|
78 +import org.kxml2.io.KXmlParser; |
|
79 |
|
80 import java.io.InputStream; |
|
81 import java.net.URL; |
|
82 @@ -164,7 +164,7 @@ |
|
83 InputStream providerStream = null; |
|
84 try { |
|
85 providerStream = url.openStream(); |
|
86 - XmlPullParser parser = new MXParser(); |
|
87 + XmlPullParser parser = new KXmlParser(); |
|
88 parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true); |
|
89 parser.setInput(providerStream, "UTF-8"); |
|
90 int eventType = parser.getEventType(); |
|
91 diff -r -u ./source/org/jivesoftware/smack/util/PacketParserUtils.java ..\..\smack_src_3_0_4/source/org/jivesoftware/smack/util/PacketParserUtils.java |
|
92 --- ./source/org/jivesoftware/smack/util/PacketParserUtils.java 2007-12-31 09:28:46.953125000 -0500 |
|
93 +++ ..\..\smack_src_3_0_4/source/org/jivesoftware/smack/util/PacketParserUtils.java 2007-12-30 21:45:08.093750000 -0500 |
|
94 @@ -426,29 +426,30 @@ |
|
95 public static Object parseWithIntrospection(String elementName, |
|
96 Class objectClass, XmlPullParser parser) throws Exception |
|
97 { |
|
98 - boolean done = false; |
|
99 - Object object = objectClass.newInstance(); |
|
100 - while (!done) { |
|
101 - int eventType = parser.next(); |
|
102 - if (eventType == XmlPullParser.START_TAG) { |
|
103 - String name = parser.getName(); |
|
104 - String stringValue = parser.nextText(); |
|
105 - PropertyDescriptor descriptor = new PropertyDescriptor(name, objectClass); |
|
106 - // Load the class type of the property. |
|
107 - Class propertyType = descriptor.getPropertyType(); |
|
108 - // Get the value of the property by converting it from a |
|
109 - // String to the correct object type. |
|
110 - Object value = decode(propertyType, stringValue); |
|
111 - // Set the value of the bean. |
|
112 - descriptor.getWriteMethod().invoke(object, value); |
|
113 - } |
|
114 - else if (eventType == XmlPullParser.END_TAG) { |
|
115 - if (parser.getName().equals(elementName)) { |
|
116 - done = true; |
|
117 - } |
|
118 - } |
|
119 - } |
|
120 - return object; |
|
121 +// boolean done = false; |
|
122 +// Object object = objectClass.newInstance(); |
|
123 +// while (!done) { |
|
124 +// int eventType = parser.next(); |
|
125 +// if (eventType == XmlPullParser.START_TAG) { |
|
126 +// String name = parser.getName(); |
|
127 +// String stringValue = parser.nextText(); |
|
128 +// PropertyDescriptor descriptor = new PropertyDescriptor(name, objectClass); |
|
129 +// // Load the class type of the property. |
|
130 +// Class propertyType = descriptor.getPropertyType(); |
|
131 +// // Get the value of the property by converting it from a |
|
132 +// // String to the correct object type. |
|
133 +// Object value = decode(propertyType, stringValue); |
|
134 +// // Set the value of the bean. |
|
135 +// descriptor.getWriteMethod().invoke(object, value); |
|
136 +// } |
|
137 +// else if (eventType == XmlPullParser.END_TAG) { |
|
138 +// if (parser.getName().equals(elementName)) { |
|
139 +// done = true; |
|
140 +// } |
|
141 +// } |
|
142 +// } |
|
143 +// return object; |
|
144 + return null; |
|
145 } |
|
146 |
|
147 /** |
|
148 Only in ..\..\smack_src_3_0_4: target |