Fix some exceptions kindly reported and tested by Sebastien Vincent. Fixing tests.

cusax-fix
Damian Minkov 15 years ago
parent ecabea4720
commit 93ae5c8291

@ -73,8 +73,7 @@ felix.auto.start.5= \
reference:file:sc-bundles/googlecontacts.jar \
reference:file:sc-bundles/protocol.jar \
reference:file:sc-bundles/protocol-media.jar \
reference:file:sc-bundles/httpcore.jar \
reference:file:sc-bundles/httpclient.jar \
reference:file:sc-bundles/httputil.jar \
reference:file:sc-bundles/packetlogging.jar \
reference:file:sc-bundles/certificate.jar

@ -483,6 +483,10 @@ else if(s.equals("hwaddr=$hwaddr") ||
usernameIx,
passwordIx);
// if there was an error in retrieving stop
if(res == null)
return null;
InputStream in = res.getContent();
// Chain a ProgressMonitorInputStream to the

@ -287,23 +287,27 @@ public static HTTPResponseResult postForm(String address,
// construct the name value pairs we will be sending
List<NameValuePair> parameters = new ArrayList<NameValuePair>();
for(int i = 0; i < formParamNames.length; i++)
// there can be no params
if(formParamNames != null)
{
// we are on the username index, insert retrieved username value
if(i == usernameParamIx && creds != null)
for(int i = 0; i < formParamNames.length; i++)
{
parameters.add(new BasicNameValuePair(
formParamNames[i], creds.getUserPrincipal().getName()));
}// we are on the password index, insert retrieved password val
else if(i == passwordParamIx && creds != null)
{
parameters.add(new BasicNameValuePair(
formParamNames[i], creds.getPassword()));
}
else // common name value pair, all info is present
{
parameters.add(new BasicNameValuePair(
formParamNames[i], formParamValues[i]));
// we are on the username index, insert retrieved username value
if(i == usernameParamIx && creds != null)
{
parameters.add(new BasicNameValuePair(
formParamNames[i], creds.getUserPrincipal().getName()));
}// we are on the password index, insert retrieved password val
else if(i == passwordParamIx && creds != null)
{
parameters.add(new BasicNameValuePair(
formParamNames[i], creds.getPassword()));
}
else // common name value pair, all info is present
{
parameters.add(new BasicNameValuePair(
formParamNames[i], formParamValues[i]));
}
}
}

@ -27,6 +27,7 @@ Import-Package: org.xml.sax,
javax.imageio,
net.java.sip.communicator.util.xml,
net.java.sip.communicator.util,
net.java.sip.communicator.util.swing,
net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.certificate,
net.java.sip.communicator.service.credentialsstorage,

Loading…
Cancel
Save