Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Commit

Permalink
Moved request size out to header, kept default at 4096
Browse files Browse the repository at this point in the history
git-svn-id: http://qrbgerl.googlecode.com/svn/trunk@5 b0ca2f76-3837-0410-b882-833e1ed5e216
  • Loading branch information
mcroydon committed Aug 10, 2007
1 parent 1cb5823 commit 61b450e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion qrbg.erl
Expand Up @@ -23,7 +23,7 @@ get_response(Socket, Username, Password) ->
ContentLength = length(Username) + length(Password) + 6,
UsernameLength = length(Username),
PasswordLength = length(Password),
Data = list_to_binary([<<0:8,ContentLength:16,UsernameLength:8>>, Username, <<PasswordLength:8>>, Password, <<4096:32>>]),
Data = list_to_binary([<<0:8,ContentLength:16,UsernameLength:8>>, Username, <<PasswordLength:8>>, Password, <<?REQUEST_SIZE:32>>]),
ok = gen_tcp:send(Socket, Data),
% TODO: handle error conditions
process_data(Socket, []).
Expand Down
1 change: 1 addition & 0 deletions qrbg.hrl
@@ -1,2 +1,3 @@
-define(USERNAME, "username").
-define(PASSWORD, "password").
-define(REQUEST_SIZE, 4096).

0 comments on commit 61b450e

Please sign in to comment.