mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 03:02:22 -05:00
Various fixes from audit
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@211 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
669fe2f131
commit
30e4bb903b
@ -113,8 +113,8 @@ public class DavGateway {
|
|||||||
versionReader = new BufferedReader(new InputStreamReader(getMethod.getResponseBodyAsStream()));
|
versionReader = new BufferedReader(new InputStreamReader(getMethod.getResponseBodyAsStream()));
|
||||||
version = versionReader.readLine();
|
version = versionReader.readLine();
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (IOException e) {
|
||||||
// ignore
|
DavGatewayTray.debug("Exception getting released version",e);
|
||||||
} finally {
|
} finally {
|
||||||
if (versionReader != null) {
|
if (versionReader != null) {
|
||||||
try {
|
try {
|
||||||
|
@ -992,11 +992,13 @@ public class ExchangeSession {
|
|||||||
/**
|
/**
|
||||||
* Search users in global address book
|
* Search users in global address book
|
||||||
*
|
*
|
||||||
* @param searchValue
|
* @param searchAttribute exchange search attribute
|
||||||
|
* @param searchValue search value
|
||||||
* @return List of users
|
* @return List of users
|
||||||
|
* @throws java.io.IOException on error
|
||||||
*/
|
*/
|
||||||
public Map<String, Map<String, String>> galFind(String searchAttribute, String searchValue) throws IOException {
|
public Map<String, Map<String, String>> galFind(String searchAttribute, String searchValue) throws IOException {
|
||||||
Map<String, Map<String, String>> results = new HashMap<String, Map<String, String>>();
|
Map<String, Map<String, String>> results;
|
||||||
GetMethod getMethod = new GetMethod(URIUtil.encodePathQuery("/public/?Cmd=galfind&" + searchAttribute + "=" + searchValue));
|
GetMethod getMethod = new GetMethod(URIUtil.encodePathQuery("/public/?Cmd=galfind&" + searchAttribute + "=" + searchValue));
|
||||||
try {
|
try {
|
||||||
int status = wdr.retrieveSessionInstance().executeMethod(getMethod);
|
int status = wdr.retrieveSessionInstance().executeMethod(getMethod);
|
||||||
|
@ -74,6 +74,9 @@ public class ExchangeSessionFactory {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private ExchangeSessionFactory() {
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create authenticated Exchange session
|
* Create authenticated Exchange session
|
||||||
*
|
*
|
||||||
|
@ -6,15 +6,13 @@ import javax.xml.stream.XMLStreamException;
|
|||||||
import javax.xml.stream.XMLStreamReader;
|
import javax.xml.stream.XMLStreamReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.List;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* XmlStreamReader utility methods
|
* XmlStreamReader utility methods
|
||||||
*/
|
*/
|
||||||
public class XMLStreamUtil {
|
public final class XMLStreamUtil {
|
||||||
private XMLStreamUtil() {
|
private XMLStreamUtil() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@ public class SwtGatewayTray implements DavGatewayTrayInterface {
|
|||||||
private static Display display;
|
private static Display display;
|
||||||
private static Shell shell;
|
private static Shell shell;
|
||||||
private boolean isActive = true;
|
private boolean isActive = true;
|
||||||
|
private boolean isReady = false;
|
||||||
|
|
||||||
public java.awt.Image getFrameIcon() {
|
public java.awt.Image getFrameIcon() {
|
||||||
return awtImage;
|
return awtImage;
|
||||||
@ -257,6 +258,7 @@ public class SwtGatewayTray implements DavGatewayTrayInterface {
|
|||||||
settingsFrame.setVisible(true);
|
settingsFrame.setVisible(true);
|
||||||
}
|
}
|
||||||
// ready
|
// ready
|
||||||
|
isReady = true;
|
||||||
synchronized (mainThread) {
|
synchronized (mainThread) {
|
||||||
mainThread.notify();
|
mainThread.notify();
|
||||||
}
|
}
|
||||||
@ -277,14 +279,16 @@ public class SwtGatewayTray implements DavGatewayTrayInterface {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.start();
|
}.start();
|
||||||
|
while (!isReady) {
|
||||||
// wait for SWT init
|
// wait for SWT init
|
||||||
try {
|
try {
|
||||||
synchronized (mainThread) {
|
synchronized (mainThread) {
|
||||||
mainThread.wait();
|
mainThread.wait(1000);
|
||||||
}
|
}
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
DavGatewayTray.error("Error waiting for SWT init", e);
|
DavGatewayTray.error("Error waiting for SWT init", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
<img src="images/thunderbirdCalendar5.png"/>
|
<img src="images/thunderbirdCalendar5.png"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>Proceeed to <a href="thunderbirddirectorysetup.html">Thunderbird calendar setup</a></p>
|
<p>Proceeed to <a href="thunderbirddirectorysetup.html">Thunderbird directory setup</a></p>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
Reference in New Issue
Block a user