Add initial support for the multiple LTTNG_UST_APP_PATHs
[lttng-ust.git] / src / lib / lttng-ust-java-agent / java / lttng-ust-agent-common / org / lttng / ust / agent / client / LttngTcpSessiondClient.java
index 82f2c2f0b96759ba3a7115b6356cbaaacd825ab4..ccffb9d360c691ed8b4fd96b5ebf19fb3002330b 100644 (file)
@@ -208,8 +208,16 @@ public class LttngTcpSessiondClient implements Runnable {
                this.outToSessiond = new DataOutputStream(sessiondSock.getOutputStream());
        }
 
-       private static String getUstAppPath() {
-               return System.getenv("LTTNG_UST_APP_PATH");
+       private String getUstAppPath() {
+               String ustAppPath = System.getenv("LTTNG_UST_APP_PATH");
+               if (ustAppPath != null) {
+                       String[] paths = ustAppPath.split(":");
+                       if (paths.length > 1) {
+                               log("':' separator in LTTNG_UST_APP_PATH, only the first path will be used");
+                       }
+                       return paths[0];
+               }
+               return ustAppPath;
        }
 
        private static String getHomePath() {
This page took 0.023357 seconds and 4 git commands to generate.