[openrtm-commit:02935] r1074 - in branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC: . executionContext
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 11月 28日 (火) 10:50:03 JST
Author: kawauchi
Date: 2017-11-28 10:50:03 +0900 (Tue, 28 Nov 2017)
New Revision: 1074
Modified:
branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ManagerServant.java
branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ModuleManager.java
branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/ExecutionContextWorker.java
Log:
[merge] r1072-1073 have been merged from trunk.
Modified: branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ManagerServant.java
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ManagerServant.java 2017-11-09 00:23:22 UTC (rev 1073)
+++ branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ManagerServant.java 2017-11-28 01:50:03 UTC (rev 1074)
@@ -1817,29 +1817,31 @@
= (RTM.Manager[])masters.toArray(new RTM.Manager[0]);
}
}
- if (m_masters.length == 0){
- try{
- Properties config = m_mgr.getConfig();
- RTM.Manager owner = findManager(
+ synchronized(m_masterMutex) {
+ if (m_masters.length == 0){
+ try{
+ Properties config = m_mgr.getConfig();
+ RTM.Manager owner = findManager(
config.getProperty("corba.master_manager"));
- if(owner == null){
- rtcout.println(Logbuf.INFO,
+ if(owner == null){
+ rtcout.println(Logbuf.INFO,
"Master manager not found");
+ return;
+ }
+ add_master_manager(owner);
+ owner.add_slave_manager(m_objref);
+
return;
}
- add_master_manager(owner);
- owner.add_slave_manager(m_objref);
-
- return;
- }
- catch(Exception ex){
- String crlf = System.getProperty("line.separator");
- rtcout.println(Logbuf.ERROR,
+ catch(Exception ex){
+ String crlf = System.getProperty("line.separator");
+ rtcout.println(Logbuf.ERROR,
"Unknown exception cought."
+ crlf
+ ex.toString());
- }
- }
+ }
+ }
+ }
}
}
Modified: branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ModuleManager.java
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ModuleManager.java 2017-11-09 00:23:22 UTC (rev 1073)
+++ branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ModuleManager.java 2017-11-28 01:50:03 UTC (rev 1074)
@@ -189,6 +189,8 @@
Class target = null;
File file = new File(moduleName);
+ rtcout.println(Logbuf.PARANOID, "Is moduleName AbsolutePath ? "
+ + file.exists());
if(file.exists()){ // When moduleName is AbsolutePath.
if(!m_absoluteAllowed) {
throw new IllegalArgumentException(
@@ -251,10 +253,12 @@
}
}
}
+ rtcout.println(Logbuf.PARANOID, "target:"+ target);
if( target==null ) {
throw new ClassNotFoundException(
"Not implemented." + moduleName);
}
+ rtcout.println(Logbuf.PARANOID, "module_path:"+ module_path);
if(module_path==null || module_path.length()==0) {
throw new IllegalArgumentException("Invalid file name.");
}
@@ -720,6 +724,9 @@
glob += suffix.trim();
rtcout.println(Logbuf.PARANOID,"glob: "+glob);
String[] files = dir.list(new FilePathFilter(glob));
+ if(files == null) {
+ continue;
+ }
rtcout.println(Logbuf.PARANOID,"files.length:"+files.length);
ArrayList<String> tmp
= new ArrayList<String>(Arrays.asList(files));
Modified: branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/ExecutionContextWorker.java
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/ExecutionContextWorker.java 2017-11-09 00:23:22 UTC (rev 1073)
+++ branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/ExecutionContextWorker.java 2017-11-28 01:50:03 UTC (rev 1074)
@@ -469,8 +469,10 @@
return ReturnCode_t.RTC_ERROR;
}
rtcout.println(Logbuf.DEBUG, "addComponent() succeeded.");
- if (m_running==false) {
- updateComponentList();
+ synchronized (m_mutex){
+ if (m_running==false) {
+ updateComponentList();
+ }
}
return ReturnCode_t.RTC_OK;
}
@@ -560,8 +562,10 @@
//return ReturnCode_t.RTC_OK;
}
}
- if (m_running==false) {
- updateComponentList();
+ synchronized (m_mutex){
+ if (m_running==false) {
+ updateComponentList();
+ }
}
return ReturnCode_t.RTC_OK;
}
More information about the openrtm-commit
mailing list