Skip to content

Commit

Permalink
From netmail fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
kreon committed Jul 8, 2015
1 parent be541a1 commit 9da0676
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,22 @@ public Object handle(Request req, Response resp) {
}
}
// seems ok
String guessedAddress = guessNewPointAddress();
FtnAddress guessedAddress = guessNewPointAddress();
if (guessedAddress == null) {
error("NO_PNT_ADDRESS_SPACE");
return "ERROR\r\nNO_PNT_ADDRESS_SPACE";
}
// do point request
PointRequest pReq = new PointRequest();
pReq.setAddr(guessedAddress);
pReq.setAddr(guessedAddress.toString());
pReq.setEmail(email);
pReq.setName(name);
pReq.setPassword(password);
// save
ORMManager.get(PointRequest.class).save(pReq);
// create link
Link link = new Link();
link.setLinkAddress(guessedAddress);
link.setLinkAddress(guessedAddress.toString());
link.setLinkName(name);
link.setProtocolAddress("-");
link.setProtocolPassword(password);
Expand All @@ -85,7 +85,7 @@ public Object handle(Request req, Response resp) {
Echoarea area = FtnTools.getAreaByName(techArea, null);
FtnTools.writeEchomail(area, "New HTDGPoint", text);
}
FtnTools.writeNetmail(FtnTools.getPrimaryFtnAddress(),
FtnTools.writeNetmail(guessedAddress,
FtnTools.getPrimaryFtnAddress(), MainHandler
.getCurrentInstance().getInfo().getStationName(),
MainHandler.getCurrentInstance().getInfo().getSysop(),
Expand All @@ -103,7 +103,7 @@ private void ok(String ok) {
HttpdModule.logger.l3("HDGPR: " + ok);
}

private String guessNewPointAddress() {
private FtnAddress guessNewPointAddress() {
FtnAddress baseNodeAddr = FtnTools.getPrimaryFtnAddress().clone();
if (baseNodeAddr.getPoint() != 0) {
return null;
Expand All @@ -113,7 +113,7 @@ private String guessNewPointAddress() {
baseNodeAddr.setPoint(i);
Link l = FtnTools.getLinkByFtnAddress(baseNodeAddr);
if (l == null) {
return baseNodeAddr.toString();
return baseNodeAddr;
}
}
return null;
Expand Down

0 comments on commit 9da0676

Please sign in to comment.