Skip to content

Commit

Permalink
allocate() larger buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
dbird committed Jan 14, 2011
1 parent c25b628 commit b1d7cd1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ protected void send(RadiusRequest req, int attempt) throws Exception
RadiusLog.warn("RadiusClient retrying request (attempt " + attempt + ")...");
}

ByteBuffer buffer = ByteBuffer.allocate(1500);
ByteBuffer buffer = ByteBuffer.allocate(4096);
format.packPacket(req, sharedSecret, buffer, true);
DatagramPacket request = new DatagramPacket(buffer.array(), buffer.position(), getRemoteInetAddress(), port);
socket.send(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public byte[] createAuthenticator(byte[] attributes, int offset, int length, Str

public boolean verifyAuthenticator(String sharedSecret)
{
ByteBuffer buffer = ByteBuffer.allocate(1500);
ByteBuffer buffer = ByteBuffer.allocate(4096);
RadiusFormat.getInstance().packAttributeList(getAttributes(), buffer, true);

byte[] newauth = RadiusUtils.makeRFC2866RequestAuthenticator(sharedSecret,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void copy(AttributeValue value)
@Override
public int getLength() {
//XXX
ByteBuffer b = ByteBuffer.allocate(1500);
ByteBuffer b = ByteBuffer.allocate(4096);
format.packAttributeList(list, b, true);
return b.position();
}
Expand Down

0 comments on commit b1d7cd1

Please sign in to comment.