Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

corba.nameserversオプションのバグ #86

Open
n-ando opened this issue Nov 9, 2020 · 1 comment
Open

corba.nameserversオプションのバグ #86

n-ando opened this issue Nov 9, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@n-ando
Copy link

n-ando commented Nov 9, 2020

Describe the bug
corba.nameservers の与えるネームサーバのリストに、unreachable なものがあると、reachable なネームサーバに対しても名前が登録されない。

Environment

  • OS: Windows 10
  • OpenRTM-aist Version 1.2.2
@n-ando n-ando added the bug Something isn't working label Nov 9, 2020
@n-ando
Copy link
Author

n-ando commented Nov 9, 2020

名前が登録されない現象は一時的なものでしたが、ネームサーバへの接続がfailした場合、NSオブジェクトがNULLで返ってくるのに、そのままリストに追加しているが、NULLの場合はリストに追加するべきではないので、修正が必要。

public void registerNameServer(final String method,
final String name_server) {
rtcout.println(Logbuf.TRACE,
"NamingManager.registerNameServer("
+ method + ", " + name_server + ")");
NamingBase name = createNamingObj(method, name_server);
synchronized (m_names) {
m_names.add(new NamingService(method, name_server, name));
}
}

    public void registerNameServer(final String method, 
                                                final String name_server) {
        rtcout.println(Logbuf.TRACE, 
            "NamingManager.registerNameServer(" 
            + method + ", " + name_server + ")");
        NamingBase name = createNamingObj(method, name_server);

        if (!name) { // <- これが必要
        synchronized (m_names) {
            m_names.add(new NamingService(method, name_server, name));
        }
        }
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants