Python agent: Support Agent protocol v2.0
[deliverable/lttng-ust.git] / liblttng-ust-python-agent / lttngust / agent.py
index 8ec26cde0514283fe068895134c4ac2360686a90..ebfa2de1dbb8abbf0b51eb89556558efe034ea74 100644 (file)
@@ -40,7 +40,7 @@ except ImportError:
 
 
 _PROTO_DOMAIN = 5
-_PROTO_MAJOR = 1
+_PROTO_MAJOR = 2
 _PROTO_MINOR = 0
 
 
@@ -317,6 +317,12 @@ def _init_threads():
     dbg._pdebug('system session daemon port: {}'.format(sys_port))
     dbg._pdebug('user session daemon port: {}'.format(user_port))
 
+    if sys_port == user_port and sys_port is not None:
+        # The two session daemon ports are the same. This is not normal.
+        # Connect to only one.
+        dbg._pdebug('both user and system session daemon have the same port')
+        sys_port = None
+
     try:
         if sys_port is not None:
             dbg._pdebug('creating system client thread')
This page took 0.024053 seconds and 5 git commands to generate.