Skip to content
Snippets Groups Projects
Commit 35a59433 authored by Felix Sidokhine's avatar Felix Sidokhine
Browse files

fixed some issues

parent a9ba6ebc
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,7 @@ public class LocalNameServer implements NameServer {
@Override
public NameLookupResponse getAddressFromName(String username) {
NameLookupResponse nameLookupResponse = null;
StatementList statementList = new StatementList();
StatementElement statementElement = new StatementElement("username","=",username,"");
statementList.addStatement(statementElement);
......@@ -52,8 +53,11 @@ public class LocalNameServer implements NameServer {
}
});
if(user.getUsername() == null) return null;
//resolve again in the database to be sure.
results = dataStore.getUserDao().getObjects(statementList);
if(results.size() == 0) return null;
}
NameLookupResponse nameLookupResponse = new NameLookupResponse();
nameLookupResponse = new NameLookupResponse();
nameLookupResponse.setName(results.get(0).getUsername());
nameLookupResponse.setAddr(results.get(0).getJamiId());
return nameLookupResponse;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment