summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Johnson <mjj29@hecate.trinhall.cam.ac.uk>2007-01-02 16:26:15 +0000
committerMatthew Johnson <mjj29@hecate.trinhall.cam.ac.uk>2007-01-02 16:26:15 +0000
commitd7d4105e5f21bd454e7b5a785493ea36f5f702aa (patch)
tree0bdded4df9c133577595f99d60c714ccab04dbae
parent9587624b311ca4fd272dea4415c57192dc469f2d (diff)
add windows files
-rw-r--r--CreateInterface.bat10
-rw-r--r--CreateInterface.sh2
-rw-r--r--DBusDaemon.bat10
-rw-r--r--DBusDaemon.sh2
-rw-r--r--DBusViewer.bat10
-rw-r--r--DBusViewer.sh2
-rw-r--r--ListDBus.bat10
-rw-r--r--ListDBus.sh2
-rw-r--r--Makefile80
-rw-r--r--TODO2
-rw-r--r--debug.conf2
-rw-r--r--org/freedesktop/dbus/AbstractConnection.java3
-rw-r--r--org/freedesktop/dbus/MessageWriter.java5
-rw-r--r--org/freedesktop/dbus/Transport.java16
14 files changed, 116 insertions, 40 deletions
diff --git a/CreateInterface.bat b/CreateInterface.bat
new file mode 100644
index 0000000..8275e45
--- /dev/null
+++ b/CreateInterface.bat
@@ -0,0 +1,10 @@
+@echo off
+setlocal
+set debug=%DEBUG%
+set version=%VERSION%
+set jarpath=%WINJARPATH%
+set javaunixjarpath=%WINUNIXJARPATH%
+
+java -DVersion=%version% -cp %javaunixjarpath%debug-%debug%.jar;%javaunixjarpath%hexdump.jar;%jarpath%dbus.jar;%jarpath%dbus-bin.jar org.freedesktop.dbus.bin.CreateInterface %*
+
+endlocal
diff --git a/CreateInterface.sh b/CreateInterface.sh
index ace9521..f0d9078 100644
--- a/CreateInterface.sh
+++ b/CreateInterface.sh
@@ -6,4 +6,4 @@ JARPATH=%JARPATH%
JAVAUNIXLIBPATH=%JAVAUNIXLIBPATH%
JAVAUNIXJARPATH=%JAVAUNIXJARPATH%
-exec java -DPid=$$ -DVersion=$VERSION -Djava.library.path=$JAVAUNIXLIBPATH -cp $JAVAUNIXJARPATH/unix.jar:$JAVAUNIXJARPATH/debug-$DEBUG.jar:$JAVAUNIXJARPATH/hexdump.jar:$JARPATH/dbus.jar org.freedesktop.dbus.bin.CreateInterface "$@"
+exec java -DPid=$$ -DVersion=$VERSION -Djava.library.path=$JAVAUNIXLIBPATH -cp $JAVAUNIXJARPATH/unix.jar:$JAVAUNIXJARPATH/debug-$DEBUG.jar:$JAVAUNIXJARPATH/hexdump.jar:$JARPATH/dbus.jar:$JARPATH/dbus-bin.jar org.freedesktop.dbus.bin.CreateInterface "$@"
diff --git a/DBusDaemon.bat b/DBusDaemon.bat
new file mode 100644
index 0000000..e9c1b71
--- /dev/null
+++ b/DBusDaemon.bat
@@ -0,0 +1,10 @@
+@echo off
+setlocal
+set debug=%DEBUG%
+set version=%VERSION%
+set jarpath=%WINJARPATH%
+set javaunixjarpath=%WINUNIXJARPATH%
+
+java -DVersion=%version% -cp %javaunixjarpath%debug-%debug%.jar;%javaunixjarpath%hexdump.jar;%jarpath%dbus.jar;%jarpath%dbus-bin.jar org.freedesktop.dbus.bin.DBusDaemon %*
+
+endlocal
diff --git a/DBusDaemon.sh b/DBusDaemon.sh
index 37ca0be..07cf973 100644
--- a/DBusDaemon.sh
+++ b/DBusDaemon.sh
@@ -6,4 +6,4 @@ JARPATH=%JARPATH%
JAVAUNIXLIBPATH=%JAVAUNIXLIBPATH%
JAVAUNIXJARPATH=%JAVAUNIXJARPATH%
-exec java -DPid=$$ -DVersion=$VERSION -Djava.library.path=$JAVAUNIXLIBPATH -cp $JAVAUNIXJARPATH/unix.jar:$JAVAUNIXJARPATH/debug-$DEBUG.jar:$JAVAUNIXJARPATH/hexdump.jar:$JARPATH/dbus.jar org.freedesktop.dbus.bin.DBusDaemon "$@"
+exec java -DPid=$$ -DVersion=$VERSION -Djava.library.path=$JAVAUNIXLIBPATH -cp $JAVAUNIXJARPATH/unix.jar:$JAVAUNIXJARPATH/debug-$DEBUG.jar:$JAVAUNIXJARPATH/hexdump.jar:$JARPATH/dbus.jar:$JARPATH/dbus-bin.jar org.freedesktop.dbus.bin.DBusDaemon "$@"
diff --git a/DBusViewer.bat b/DBusViewer.bat
new file mode 100644
index 0000000..853b590
--- /dev/null
+++ b/DBusViewer.bat
@@ -0,0 +1,10 @@
+@echo off
+setlocal
+set debug=%DEBUG%
+set version=%VERSION%
+set jarpath=%WINJARPATH%
+set javaunixjarpath=%WINUNIXJARPATH%
+
+java -DVersion=%version% -cp %javaunixjarpath%debug-%debug%.jar;%javaunixjarpath%hexdump.jar;%jarpath%dbus.jar;%jarpath%dbus-viewer.jar org.freedesktop.dbus.viewer.DBusViewer %*
+
+endlocal
diff --git a/DBusViewer.sh b/DBusViewer.sh
index 59cd40d..dc40573 100644
--- a/DBusViewer.sh
+++ b/DBusViewer.sh
@@ -6,4 +6,4 @@ JARPATH=%JARPATH%
JAVAUNIXLIBPATH=%JAVAUNIXLIBPATH%
JAVAUNIXJARPATH=%JAVAUNIXJARPATH%
-exec java -DPid=$$ -DVersion=$VERSION -Djava.library.path=$JAVAUNIXLIBPATH -cp $JAVAUNIXJARPATH/unix.jar:$JAVAUNIXJARPATH/debug-$DEBUG.jar:$JAVAUNIXJARPATH/hexdump.jar:$JARPATH/dbus.jar org.freedesktop.dbus.bin.viewer.DBusViewer "$@"
+exec java -DPid=$$ -DVersion=$VERSION -Djava.library.path=$JAVAUNIXLIBPATH -cp $JAVAUNIXJARPATH/unix.jar:$JAVAUNIXJARPATH/debug-$DEBUG.jar:$JAVAUNIXJARPATH/hexdump.jar:$JARPATH/dbus.jar:$JARPATH/dbus-bin.jar org.freedesktop.dbus.bin.viewer.DBusViewer "$@"
diff --git a/ListDBus.bat b/ListDBus.bat
new file mode 100644
index 0000000..2dd6439
--- /dev/null
+++ b/ListDBus.bat
@@ -0,0 +1,10 @@
+@echo off
+setlocal
+set debug=%DEBUG%
+set version=%VERSION%
+set jarpath=%WINJARPATH%
+set javaunixjarpath=%WINUNIXJARPATH%
+
+java -DVersion=%version% -cp %javaunixjarpath%debug-%debug%.jar;%javaunixjarpath%hexdump.jar;%jarpath%dbus.jar;%jarpath%dbus-bin.jar org.freedesktop.dbus.bin.ListDBus %*
+
+endlocal
diff --git a/ListDBus.sh b/ListDBus.sh
index 310eafa..29351ab 100644
--- a/ListDBus.sh
+++ b/ListDBus.sh
@@ -6,4 +6,4 @@ JARPATH=%JARPATH%
JAVAUNIXLIBPATH=%JAVAUNIXLIBPATH%
JAVAUNIXJARPATH=%JAVAUNIXJARPATH%
-exec java -DPid=$$ -DVersion=$VERSION -Djava.library.path=$JAVAUNIXLIBPATH -cp $JAVAUNIXJARPATH/unix.jar:$JAVAUNIXJARPATH/debug-$DEBUG.jar:$JAVAUNIXJARPATH/hexdump.jar:$JARPATH/dbus.jar org.freedesktop.dbus.bin.ListDBus "$@"
+exec java -DPid=$$ -DVersion=$VERSION -Djava.library.path=$JAVAUNIXLIBPATH -cp $JAVAUNIXJARPATH/unix.jar:$JAVAUNIXJARPATH/debug-$DEBUG.jar:$JAVAUNIXJARPATH/hexdump.jar:$JARPATH/dbus.jar:$JARPATH/dbus-bin.jar org.freedesktop.dbus.bin.ListDBus "$@"
diff --git a/Makefile b/Makefile
index 5de13bf..84058c5 100644
--- a/Makefile
+++ b/Makefile
@@ -43,38 +43,49 @@ DEBUG=disable
VERSION = 2.0
RELEASEVERSION = 2.0
-all: libdbus-java-$(VERSION).jar dbus-java-viewer-$(VERSION).jar bin/DBusDaemon bin/ListDBus bin/CreateInterface bin/DBusViewer
+DISTFILES=dbus-java.tex Makefile org tmp-session.conf CreateInterface.sgml DBusDaemon.sgml ListDBus.sgml DBusViewer.sgml changelog AUTHORS COPYING README INSTALL CreateInterface.sh DBusDaemon.sh ListDBus.sh DBusViewer.sh DBusDaemon.bat CreateInterface.bat ListDBus.bat DBusViewer.bat
+
+all: libdbus-java-$(VERSION).jar dbus-java-viewer-$(VERSION).jar bin/DBusDaemon bin/ListDBus bin/CreateInterface bin/DBusViewer dbus-java-bin-$(VERSION).jar
clean:
- rm -rf doc bin classes testbin
- rm -f *.1 *.o *.so *.h .dist .classes .testclasses .doc *.jar *.log pid address tmp-session-bus *.gz .viewerclasses .bin .testbin
- rm -rf libdbus-$(VERSION)
- rm -rf libdbus-$(RELEASEVERSION)
+ rm -rf doc bin classes testbin win
+ rm -f *.1 *.o *.so *.h .dist .classes .testclasses .doc *.jar *.log pid address tmp-session-bus *.gz .viewerclasses .bin .testbin .win
+ rm -rf dbus-$(VERSION)
+ rm -rf dbus-$(RELEASEVERSION)
classes: .classes
testclasses: .testclasses
viewerclasses: .viewerclasses
+binclasses: .binclasses
.testclasses: $(SRCDIR)/dbus/test/*.java .classes
mkdir -p classes
$(JAVAC) -cp classes:${JAVAUNIXJARDIR}/debug-$(DEBUG).jar:${JAVAUNIXJARDIR}/hexdump.jar:$(CLASSPATH) -d classes $(JCFLAGS) $(SRCDIR)/dbus/test/*.java
touch .testclasses
.viewerclasses: $(SRCDIR)/dbus/viewer/*.java .classes
mkdir -p classes
- $(JAVAC) -cp classes:$(CLASSPATH) -d classes $(JCFLAGS) $(SRCDIR)/dbus/viewer/*.java
+ $(JAVAC) -cp classes:$(CLASSPATH):${JAVAUNIXJARDIR}/unix.jar:${JAVAUNIXJARDIR}/debug-$(DEBUG).jar:${JAVAUNIXJARDIR}/hexdump.jar -d classes $(JCFLAGS) $(SRCDIR)/dbus/viewer/*.java
touch .viewerclasses
-.classes: $(SRCDIR)/*.java $(SRCDIR)/dbus/*.java $(SRCDIR)/dbus/exceptions/*.java $(SRCDIR)/dbus/types/*.java $(SRCDIR)/dbus/bin/*.java
+.binclasses: $(SRCDIR)/dbus/bin/*.java .classes
+ mkdir -p classes
+ $(JAVAC) -cp classes:$(CLASSPATH):${JAVAUNIXJARDIR}/unix.jar:${JAVAUNIXJARDIR}/debug-$(DEBUG).jar:${JAVAUNIXJARDIR}/hexdump.jar -d classes $(JCFLAGS) $(SRCDIR)/dbus/bin/*.java
+ touch .binclasses
+.classes: $(SRCDIR)/*.java $(SRCDIR)/dbus/*.java $(SRCDIR)/dbus/exceptions/*.java $(SRCDIR)/dbus/types/*.java
mkdir -p classes
$(JAVAC) -d classes -cp classes:${JAVAUNIXJARDIR}/unix.jar:${JAVAUNIXJARDIR}/debug-$(DEBUG).jar:${JAVAUNIXJARDIR}/hexdump.jar:$(CLASSPATH) $(JCFLAGS) $^
touch .classes
libdbus-java-$(VERSION).jar: .classes
- (cd classes; $(JAR) -cf ../$@ org/freedesktop/dbus/*.class org/freedesktop/*.class org/freedesktop/dbus/types/*.class org/freedesktop/dbus/exceptions/*.class org/freedesktop/dbus/bin/*.class)
+ (cd classes; $(JAR) -cf ../$@ org/freedesktop/dbus/*.class org/freedesktop/*.class org/freedesktop/dbus/types/*.class org/freedesktop/dbus/exceptions/*.class)
dbus-java-test-$(VERSION).jar: .testclasses
(cd classes; $(JAR) -cf ../$@ org/freedesktop/dbus/test/*.class)
dbus-java-viewer-$(VERSION).jar: .viewerclasses
(cd classes; $(JAR) -cf ../$@ org/freedesktop/dbus/viewer/*.class)
+dbus-java-bin-$(VERSION).jar: .binclasses
+ (cd classes; $(JAR) -cf ../$@ org/freedesktop/dbus/bin/*.class)
dbus.jar: libdbus-java-$(VERSION).jar
ln -sf $< $@
+dbus-bin.jar: dbus-java-bin-$(VERSION).jar
+ ln -sf $< $@
jar: libdbus-java-$(VERSION).jar
doc: doc/dbus-java.dvi doc/dbus-java.ps doc/dbus-java.pdf doc/dbus-java/index.html doc/api/index.html
@@ -82,6 +93,9 @@ doc: doc/dbus-java.dvi doc/dbus-java.ps doc/dbus-java.pdf doc/dbus-java/index.ht
mkdir -p doc
mkdir -p doc/dbus-java
touch .doc
+.win:
+ mkdir -p win
+ touch .win
.bin:
mkdir -p bin
touch .bin
@@ -110,8 +124,11 @@ doc/api/index.html: $(SRCDIR)/*.java $(SRCDIR)/dbus/*.java .doc
bin/%: %.sh .bin
sed 's,\%JARPATH\%,$(JARPREFIX),;s,\%JAVAUNIXJARPATH\%,$(JAVAUNIXJARDIR),;s,\%JAVAUNIXLIBPATH\%,$(JAVAUNIXLIBDIR),;s,\%VERSION\%,$(VERSION),;s,\%DEBUG\%,$(DEBUG),' < $< > $@
+win/%.bat: %.bat .win
+ sed 's,\%WINJARPATH\%,$(JARPREFIX),;s,\%WINUNIXJARPATH\%,$(JAVAUNIXJARDIR),;s,\%VERSION\%,$(VERSION),;s,\%DEBUG\%,$(DEBUG),' < $< > $@
+
testbin/%: %.sh .testbin
- sed 's,\%JARPATH\%,.,;s,\%JAVAUNIXJARPATH\%,$(JAVAUNIXJARDIR),;s,\%JAVAUNIXLIBPATH\%,$(JAVAUNIXLIBDIR),;s,\%VERSION\%,$(VERSION),' < $< > $@
+ sed 's,\%JARPATH\%,.,;s,\%JAVAUNIXJARPATH\%,$(JAVAUNIXJARDIR),;s,\%JAVAUNIXLIBPATH\%,$(JAVAUNIXLIBDIR),;s,\%VERSION\%,$(VERSION),;s,\%DEBUG\%,$(DEBUG),' < $< > $@
chmod 755 $@
testrun: libdbus-java-$(VERSION).jar dbus-java-test-$(VERSION).jar
@@ -146,26 +163,25 @@ viewer: libdbus-java-$(VERSION).jar dbus-java-viewer-$(VERSION).jar
#dbus-daemon --config-file=tmp-session.conf --print-pid --print-address=5 --fork >pid 5>address ; \
-low-level: libdbus-java-$(VERSION).jar dbus-java-test-$(VERSION).jar testbin/DBusDaemon dbus.jar
+low-level: libdbus-java-$(VERSION).jar dbus-java-test-$(VERSION).jar testbin/DBusDaemon dbus.jar dbus-java-bin-$(VERSION).jar dbus-bin.jar
( testbin/DBusDaemon --addressfile address --pidfile pid & \
sleep 1; \
export DBUS_SESSION_BUS_ADDRESS=$$(cat address) ;\
$(MAKE) DBUS_JAVA_FLOATS=true low-level-run ;\
kill $$(cat pid))
-check: libdbus-java-$(VERSION).jar dbus-java-test-$(VERSION).jar testbin/DBusDaemon dbus.jar
+check: libdbus-java-$(VERSION).jar dbus-java-test-$(VERSION).jar testbin/DBusDaemon dbus.jar dbus-java-bin-$(VERSION).jar dbus-bin.jar
( PASS=false; \
- testbin/DBusDaemon --addressfile address --pidfile pid &\
+ testbin/DBusDaemon --addressfile address --pidfile pid 2> server.log&\
sleep 1; \
export DBUS_SESSION_BUS_ADDRESS=$$(cat address) ;\
- dbus-monitor &> monitor.log & \
- if $(MAKE) DBUS_JAVA_FLOATS=true testrun ; then export PASS=true; fi ; \
+ if $(MAKE) DBUS_JAVA_FLOATS=true testrun 2> client.log; then export PASS=true; fi ; \
kill $$(cat pid) ; \
if [[ "$$PASS" == "true" ]]; then exit 0; else exit 1; fi )
cross-test-compile: libdbus-java-$(VERSION).jar dbus-java-test-$(VERSION).jar
-internal-cross-test: libdbus-java-$(VERSION).jar dbus-java-test-$(VERSION).jar testbin/DBusDaemon dbus.jar
+internal-cross-test: libdbus-java-$(VERSION).jar dbus-java-test-$(VERSION).jar testbin/DBusDaemon dbus.jar dbus-java-bin-$(VERSION).jar dbus-bin.jar
( testbin/DBusDaemon --addressfile address --pidfile pid &\
sleep 1; \
export DBUS_SESSION_BUS_ADDRESS=$$(cat address) ;\
@@ -179,7 +195,7 @@ peer-to-peer-test: libdbus-java-$(VERSION).jar dbus-java-test-$(VERSION).jar
sleep 1;\
$(MAKE) DBUS_JAVA_FLOATS=true -s peer-client 2>&1 | tee client.log )
-two-part-test: libdbus-java-$(VERSION).jar dbus-java-test-$(VERSION).jar testbin/DBusDaemon dbus.jar
+two-part-test: libdbus-java-$(VERSION).jar dbus-java-test-$(VERSION).jar testbin/DBusDaemon dbus.jar dbus-java-bin-$(VERSION).jar dbus-bin.jar
( testbin/DBusDaemon --addressfile address --pidfile pid &\
sleep 1; \
export DBUS_SESSION_BUS_ADDRESS=$$(cat address) ;\
@@ -188,7 +204,7 @@ two-part-test: libdbus-java-$(VERSION).jar dbus-java-test-$(VERSION).jar testbin
$(MAKE) DBUS_JAVA_FLOATS=true -s two-part-client | tee client.log ;\
kill $$(cat pid) ; )
-profile: libdbus-java-$(VERSION).jar dbus-java-test-$(VERSION).jar testbin/DBusDaemon dbus.jar
+profile: libdbus-java-$(VERSION).jar dbus-java-test-$(VERSION).jar testbin/DBusDaemon dbus.jar dbus-java-bin-$(VERSION).jar dbus-bin.jar
( PASS=false; \
testbin/DBusDaemon --addressfile address --pidfile pid &\
sleep 1; \
@@ -198,19 +214,21 @@ profile: libdbus-java-$(VERSION).jar dbus-java-test-$(VERSION).jar testbin/DBusD
if [[ "$$PASS" == "true" ]]; then exit 0; else exit 1; fi )
uninstall:
- rm -f $(DESTDIR)$(JARPREFIX)/dbus.jar $(DESTDIR)$(JARPREFIX)/dbus-$(VERSION).jar $(DESTDIR)$(JARPREFIX)/dbus-viewer.jar $(DESTDIR)$(JARPREFIX)/dbus-viewer-$(VERSION).jar
+ rm -f $(DESTDIR)$(JARPREFIX)/dbus.jar $(DESTDIR)$(JARPREFIX)/dbus-$(VERSION).jar $(DESTDIR)$(JARPREFIX)/dbus-viewer.jar $(DESTDIR)$(JARPREFIX)/dbus-viewer-$(VERSION).jar $(DESTDIR)$(JARPREFIX)/dbus-bin.jar $(DESTDIR)$(JARPREFIX)/dbus-bin-$(VERSION).jar
rm -rf $(DESTDIR)$(DOCPREFIX)
rm -f $(DESTDIR)$(MANPREFIX)/CreateInterface.1 $(DESTDIR)$(MANPREFIX)/ListDBus.1 $(DESTDIR)$(MANPREFIX)/DBusViewer.1 $(DESTDIR)$(MANPREFIX)/DBusDaemon.1
rm -f $(DESTDIR)$(BINPREFIX)/CreateInterface $(DESTDIR)$(BINPREFIX)/ListDBus $(DESTDIR)$(BINPREFIX)/DBusViewer $(DESTDIR)$(BINPREFIX)/DBusDaemon
install: install-bin install-man
-install-bin: dbus-java-viewer-$(VERSION).jar libdbus-java-$(VERSION).jar bin/CreateInterface bin/ListDBus bin/DBusViewer bin/DBusDaemon
+install-bin: dbus-java-viewer-$(VERSION).jar libdbus-java-$(VERSION).jar bin/CreateInterface bin/ListDBus bin/DBusViewer bin/DBusDaemon dbus-java-bin-$(VERSION).jar
install -d $(DESTDIR)$(JARPREFIX)
install -m 644 libdbus-java-$(VERSION).jar $(DESTDIR)$(JARPREFIX)/dbus-$(VERSION).jar
install -m 644 dbus-java-viewer-$(VERSION).jar $(DESTDIR)$(JARPREFIX)/dbus-viewer-$(VERSION).jar
+ install -m 644 dbus-java-bin-$(VERSION).jar $(DESTDIR)$(JARPREFIX)/dbus-bin-$(VERSION).jar
ln -sf dbus-$(VERSION).jar $(DESTDIR)$(JARPREFIX)/dbus.jar
ln -sf dbus-viewer-$(VERSION).jar $(DESTDIR)$(JARPREFIX)/dbus-viewer.jar
+ ln -sf dbus-bin-$(VERSION).jar $(DESTDIR)$(JARPREFIX)/dbus-bin.jar
install -d $(DESTDIR)$(BINPREFIX)
install bin/DBusViewer $(DESTDIR)$(BINPREFIX)
install bin/CreateInterface $(DESTDIR)$(BINPREFIX)
@@ -242,24 +260,24 @@ install-doc: doc
cp -a doc/api/* $(DESTDIR)$(DOCPREFIX)/api
dist: .dist
-.dist: dbus-java.tex Makefile org tmp-session.conf CreateInterface.sgml DBusDaemon.sgml ListDBus.sgml DBusViewer.sgml changelog AUTHORS COPYING README INSTALL CreateInterface.sh DBusDaemon.sh ListDBus.sh DBusViewer.sh
- mkdir -p libdbus-java-$(VERSION)
- cp -fa $^ libdbus-java-$(VERSION)
+.dist: $(DISTFILES)
+ mkdir -p dbus-java-$(VERSION)
+ cp -fa $^ dbus-java-$(VERSION)
touch .dist
-tar: libdbus-java-$(VERSION).tar.gz
+tar: dbus-java-$(VERSION).tar.gz
distclean:
- rm -rf libdbus-java-$(VERSION)
- rm -rf libdbus-java-$(VERSION).tar.gz
+ rm -rf dbus-java-$(VERSION)
+ rm -rf dbus-java-$(VERSION).tar.gz
rm -f .dist
libdbus-java-$(VERSION): .dist
-libdbus-java-$(VERSION).tar.gz: .dist
- tar zcf $@ libdbus-java-$(VERSION)
+dbus-java-$(VERSION).tar.gz: .dist
+ tar zcf $@ dbus-java-$(VERSION)
-libdbus-java-$(RELEASEVERSION).tar.gz: dbus-java.tex Makefile org tmp-session.conf CreateInterface.sgml DBusDaemon.sgml ListDBus.sgml DBusViewer.sgml changelog AUTHORS COPYING README INSTALL CreateInterface.sh ListDBus.sh DBusViewer.sh DBusDaemon.sh
- mkdir -p libdbus-java-$(RELEASEVERSION)/
- cp -fa $^ libdbus-java-$(RELEASEVERSION)/
- tar zcf $@ libdbus-java-$(RELEASEVERSION)
+dbus-java-$(RELEASEVERSION).tar.gz: $(DISTFILES)
+ mkdir -p dbus-java-$(RELEASEVERSION)/
+ cp -fa $^ dbus-java-$(RELEASEVERSION)/
+ tar zcf $@ dbus-java-$(RELEASEVERSION)
diff --git a/TODO b/TODO
index e37cde6..c7d5bf6 100644
--- a/TODO
+++ b/TODO
@@ -1,3 +1,5 @@
+ * check recv thread is exiting properly, maybe call in.close()?
+ * add header checks to daemon
* write DBusDaemon man page && --help text
* add TERM/etc handler to DBusDaemon
* autolaunch
diff --git a/debug.conf b/debug.conf
index 1bd99a7..3939078 100644
--- a/debug.conf
+++ b/debug.conf
@@ -1,5 +1,5 @@
org.freedesktop.dbus.MessageReader = VERBOSE
-org.freedesktop.dbus.MessageWriter = ERR
+org.freedesktop.dbus.MessageWriter = VERBOSE
org.freedesktop.dbus.Message = ERR
org.freedesktop.dbus.MethodCall = ERR
org.freedesktop.dbus.MethodTuple = ERR
diff --git a/org/freedesktop/dbus/AbstractConnection.java b/org/freedesktop/dbus/AbstractConnection.java
index 571c3b5..a7dfc08 100644
--- a/org/freedesktop/dbus/AbstractConnection.java
+++ b/org/freedesktop/dbus/AbstractConnection.java
@@ -160,6 +160,7 @@ public abstract class AbstractConnection
}
if (null != m)
sendMessage(m);
+ m = null;
}
if (Debug.debug) Debug.print(Debug.INFO, "Flushing outbound queue and quitting");
@@ -172,6 +173,8 @@ public abstract class AbstractConnection
}
sendMessage(m);
} while (null != m);
+
+ // close the underlying streams
}
}
/**
diff --git a/org/freedesktop/dbus/MessageWriter.java b/org/freedesktop/dbus/MessageWriter.java
index 97dde99..ad7e2af 100644
--- a/org/freedesktop/dbus/MessageWriter.java
+++ b/org/freedesktop/dbus/MessageWriter.java
@@ -29,6 +29,11 @@ public class MessageWriter
if (Debug.debug) {
Debug.print(Debug.INFO, "<= "+m);
}
+ if (null == m) return;
+ if (null == m.getWireData()) {
+ if (Debug.debug) Debug.print(Debug.WARN, "Message "+m+" wire-data was null!");
+ return;
+ }
for (byte[] buf: m.getWireData()) {
if (Debug.debug)
Debug.print(Debug.VERBOSE, "("+buf+"):"+ (null==buf? "": Hexdump.format(buf)));
diff --git a/org/freedesktop/dbus/Transport.java b/org/freedesktop/dbus/Transport.java
index ed9e976..536a28d 100644
--- a/org/freedesktop/dbus/Transport.java
+++ b/org/freedesktop/dbus/Transport.java
@@ -20,6 +20,7 @@ import java.io.InputStreamReader;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
+import java.lang.reflect.Method;
import java.net.InetSocketAddress;
import java.net.ServerSocket;
import java.net.Socket;
@@ -34,7 +35,6 @@ import cx.ath.matthew.unix.UnixServerSocket;
import cx.ath.matthew.unix.UnixSocketAddress;
import cx.ath.matthew.utils.Hexdump;
import cx.ath.matthew.debug.Debug;
-import com.sun.security.auth.module.UnixSystem;
public class Transport
{
@@ -438,9 +438,17 @@ public class Transport
*/
public boolean auth(int mode, int types, String guid, OutputStream out, InputStream in) throws IOException
{
- UnixSystem uns = new UnixSystem();
- long uid = uns.getUid();
- String Uid = stupidlyEncode(""+uid);
+ String username = System.getProperty("user.name");
+ String Uid = null;
+ try {
+ Class c = Class.forName("com.sun.security.auth.module.UnixSystem");
+ Method m = c.getMethod("getUid");
+ Object o = c.newInstance();
+ long uid = (Long) m.invoke(o);
+ Uid = stupidlyEncode(""+uid);
+ } catch (Exception e) {
+ Uid = stupidlyEncode(username);
+ }
Command c;
int failed = 0;
int current = 0;