summaryrefslogtreecommitdiff
path: root/org
diff options
context:
space:
mode:
Diffstat (limited to 'org')
-rw-r--r--org/freedesktop/dbus/Message.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/org/freedesktop/dbus/Message.java b/org/freedesktop/dbus/Message.java
index 4640630..c514002 100644
--- a/org/freedesktop/dbus/Message.java
+++ b/org/freedesktop/dbus/Message.java
@@ -177,7 +177,9 @@ public class Message
headers = new HashMap<Byte, Object>();
big = (Endian.BIG == endian);
bytecounter = 0;
- serial = ++globalserial;
+ synchronized (Message.class) {
+ serial = ++globalserial;
+ }
if (Debug.debug) Debug.print(Debug.DEBUG, "Creating message with serial "+serial);
this.type = type;
this.flags = flags;