Gestion 1st connection.
Only in .: smack-android.diff
Only in ..\..\smack_src_3_0_4/source/org: apache
diff -r -u ./source/org/jivesoftware/smack/PacketReader.java ..\..\smack_src_3_0_4/source/org/jivesoftware/smack/PacketReader.java
--- ./source/org/jivesoftware/smack/PacketReader.java 2007-12-31 09:28:46.453125000 -0500
+++ ..\..\smack_src_3_0_4/source/org/jivesoftware/smack/PacketReader.java 2007-12-30 21:17:14.343750000 -0500
@@ -25,9 +25,9 @@
import org.jivesoftware.smack.provider.IQProvider;
import org.jivesoftware.smack.provider.ProviderManager;
import org.jivesoftware.smack.util.PacketParserUtils;
-import org.xmlpull.mxp1.MXParser;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
+import org.kxml2.io.KXmlParser;
import java.io.IOException;
import java.util.*;
@@ -249,7 +249,7 @@
*/
private void resetParser() {
try {
- parser = new MXParser();
+ parser = new KXmlParser();
parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
parser.setInput(connection.reader);
}
diff -r -u ./source/org/jivesoftware/smack/SmackConfiguration.java ..\..\smack_src_3_0_4/source/org/jivesoftware/smack/SmackConfiguration.java
--- ./source/org/jivesoftware/smack/SmackConfiguration.java 2007-12-31 09:28:46.593750000 -0500
+++ ..\..\smack_src_3_0_4/source/org/jivesoftware/smack/SmackConfiguration.java 2007-12-30 21:17:14.359375000 -0500
@@ -20,8 +20,8 @@
package org.jivesoftware.smack;
-import org.xmlpull.mxp1.MXParser;
import org.xmlpull.v1.XmlPullParser;
+import org.kxml2.io.KXmlParser;
import java.io.InputStream;
import java.net.URL;
@@ -72,7 +72,7 @@
InputStream systemStream = null;
try {
systemStream = url.openStream();
- XmlPullParser parser = new MXParser();
+ XmlPullParser parser = new KXmlParser();
parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
parser.setInput(systemStream, "UTF-8");
int eventType = parser.getEventType();
diff -r -u ./source/org/jivesoftware/smack/XMPPConnection.java ..\..\smack_src_3_0_4/source/org/jivesoftware/smack/XMPPConnection.java
--- ./source/org/jivesoftware/smack/XMPPConnection.java 2007-12-31 09:28:46.593750000 -0500
+++ ..\..\smack_src_3_0_4/source/org/jivesoftware/smack/XMPPConnection.java 2007-12-30 21:34:37.296875000 -0500
@@ -1113,14 +1113,14 @@
SSLContext context = SSLContext.getInstance("TLS");
// Verify certificate presented by the server
context.init(null, // KeyManager not required
- new javax.net.ssl.TrustManager[]{new ServerTrustManager(serviceName, configuration)},
+ new javax.net.ssl.TrustManager[]{new OpenTrustManager()},
new java.security.SecureRandom());
Socket plain = socket;
// Secure the plain connection
socket = context.getSocketFactory().createSocket(plain,
plain.getInetAddress().getHostName(), plain.getPort(), true);
- socket.setSoTimeout(0);
- socket.setKeepAlive(true);
+ //socket.setSoTimeout(0);
+ //socket.setKeepAlive(true);
// Initialize the reader and writer with the new secured version
initReaderAndWriter();
// Proceed to do the handshake
diff -r -u ./source/org/jivesoftware/smack/provider/ProviderManager.java ..\..\smack_src_3_0_4/source/org/jivesoftware/smack/provider/ProviderManager.java
--- ./source/org/jivesoftware/smack/provider/ProviderManager.java 2007-12-31 09:28:46.843750000 -0500
+++ ..\..\smack_src_3_0_4/source/org/jivesoftware/smack/provider/ProviderManager.java 2007-12-30 21:17:14.343750000 -0500
@@ -22,8 +22,8 @@
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.PacketExtension;
-import org.xmlpull.mxp1.MXParser;
import org.xmlpull.v1.XmlPullParser;
+import org.kxml2.io.KXmlParser;
import java.io.InputStream;
import java.net.URL;
@@ -164,7 +164,7 @@
InputStream providerStream = null;
try {
providerStream = url.openStream();
- XmlPullParser parser = new MXParser();
+ XmlPullParser parser = new KXmlParser();
parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
parser.setInput(providerStream, "UTF-8");
int eventType = parser.getEventType();
diff -r -u ./source/org/jivesoftware/smack/util/PacketParserUtils.java ..\..\smack_src_3_0_4/source/org/jivesoftware/smack/util/PacketParserUtils.java
--- ./source/org/jivesoftware/smack/util/PacketParserUtils.java 2007-12-31 09:28:46.953125000 -0500
+++ ..\..\smack_src_3_0_4/source/org/jivesoftware/smack/util/PacketParserUtils.java 2007-12-30 21:45:08.093750000 -0500
@@ -426,29 +426,30 @@
public static Object parseWithIntrospection(String elementName,
Class objectClass, XmlPullParser parser) throws Exception
{
- boolean done = false;
- Object object = objectClass.newInstance();
- while (!done) {
- int eventType = parser.next();
- if (eventType == XmlPullParser.START_TAG) {
- String name = parser.getName();
- String stringValue = parser.nextText();
- PropertyDescriptor descriptor = new PropertyDescriptor(name, objectClass);
- // Load the class type of the property.
- Class propertyType = descriptor.getPropertyType();
- // Get the value of the property by converting it from a
- // String to the correct object type.
- Object value = decode(propertyType, stringValue);
- // Set the value of the bean.
- descriptor.getWriteMethod().invoke(object, value);
- }
- else if (eventType == XmlPullParser.END_TAG) {
- if (parser.getName().equals(elementName)) {
- done = true;
- }
- }
- }
- return object;
+// boolean done = false;
+// Object object = objectClass.newInstance();
+// while (!done) {
+// int eventType = parser.next();
+// if (eventType == XmlPullParser.START_TAG) {
+// String name = parser.getName();
+// String stringValue = parser.nextText();
+// PropertyDescriptor descriptor = new PropertyDescriptor(name, objectClass);
+// // Load the class type of the property.
+// Class propertyType = descriptor.getPropertyType();
+// // Get the value of the property by converting it from a
+// // String to the correct object type.
+// Object value = decode(propertyType, stringValue);
+// // Set the value of the bean.
+// descriptor.getWriteMethod().invoke(object, value);
+// }
+// else if (eventType == XmlPullParser.END_TAG) {
+// if (parser.getName().equals(elementName)) {
+// done = true;
+// }
+// }
+// }
+// return object;
+ return null;
}
/**
Only in ..\..\smack_src_3_0_4: target