Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
kianmeng committed Apr 12, 2022
1 parent 04b09f3 commit 16708cb
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions rebar.config.script
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
%%
%% If the CHUMAK_CURVE_LIB environment variable is _not_ set,
%% nacerl will be used. On Windows an additional check will be
%% preformed first: if gcc and make are not available, `none` will
%% performed first: if gcc and make are not available, `none` will
%% be assumed.
%%
%% Since it is not possible to reliably and completely build any of
%% the options that depend on libsodium from rebar3, only in the `nacerl`
%% case the library will be fetched and built automatically as a
%% dependency. In the other cases you wil have to make the library available
%% dependency. In the other cases you will have to make the library available
%% via other means.
%%
%% The selected option ("nacl", "enacl", "nacerl" or "none") will be
Expand Down
2 changes: 1 addition & 1 deletion src/chumak.erl
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ socket(Type)
%% <dd>- Provide public keys of authorised clients</dd>
%% <dd>- type: list of string() or integer() , or 'any'</dd>
%% <dd>Determines which clients are authorised to connect to the server. You
%% may set this on CURVE server sockets. If it is not set explictly, if
%% may set this on CURVE server sockets. If it is not set explicitly, if
%% defaults to 'any', which means that all clients have access (provided that
%% they know the CURVE secret key). If a list of keys is provided, only
%% clients with those public keys can connect to the server. You can provide
Expand Down
2 changes: 1 addition & 1 deletion src/chumak_bind.erl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ listener(ListenSocket, ParentPid) ->
{ok, Socket} = gen_tcp:accept(ListenSocket),
{ok, PeerPid} = gen_server:call(ParentPid, {accept, Socket}), %% get peer's pid of chumak_peer
ok = gen_tcp:controlling_process(Socket, PeerPid), %% set controlling of new socket to chumak_peer
%% Start to negociate greetings after new process is owner
%% Start to negotiate greetings after new process is owner
gen_server:cast(PeerPid, negotiate_greetings),
listener(ListenSocket, ParentPid)
catch
Expand Down
2 changes: 1 addition & 1 deletion src/chumak_command.erl
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ encode_ready(SocketType, Identity, Resource, Metadata) when is_atom(SocketType)
error_reason(#error{reason=Reason}) ->
Reason.

%% @doc returns an encoded errorr command
%% @doc returns an encoded error command
-spec encode_error(Reason::string()) -> Data::binary().
encode_error(Reason) when is_list(Reason) ->
ReasonBin = list_to_binary(Reason),
Expand Down
2 changes: 1 addition & 1 deletion src/chumak_pair.erl
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ send_multipart(#chumak_pair{pending_send=nil, pair_pid=nil}=State, Multipart, Fr
{noreply, State#chumak_pair{pending_send={From, Multipart}}};

send_multipart(#chumak_pair{pending_send=nil, pair_pid=PeerPid}=State, Multipart, From) ->
%% send messsage now
%% send message now
chumak_peer:send(PeerPid, Multipart, From),
{noreply, State};

Expand Down
8 changes: 4 additions & 4 deletions src/chumak_protocol.erl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

%% @doc Parser of ZeroMQ protocol
%%
%% This module was created to make responsability of decode and make a buffer of ZeroMQ wire protocol,
%% the client of this module needs to anounce that more bytes were been received by peer.
%% This module was created to make responsibility of decode and make a buffer of ZeroMQ wire protocol,
%% the client of this module needs to announce that more bytes were been received by peer.
%%

-module(chumak_protocol).
Expand Down Expand Up @@ -480,11 +480,11 @@ decode(#decoder{state=ready}=Decoder, Frame) ->
<<_:5, _:1, 1:1, _:1, Size:64, _RemaingFrame/binary>> ->
require_size(Decoder, Size+9, Frame, NextState);

%% if size is remaing for small frame
%% if size is remaining for small frame
<<_:5, _:1, 0:1, _:1>> ->
require_size(Decoder, 2, Frame, ready);

%% if size is remaing for large frame
%% if size is remaining for large frame
<<_:5, _:1, 1:1, _:1, _TooShortToBeSize/binary>> ->
require_size(Decoder, 9, Frame, ready);

Expand Down
2 changes: 1 addition & 1 deletion src/chumak_socket.erl
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ handle_info({queue_ready, Identity, From}, State) ->
queue_ready(Identity, From, State);

%% When the client is crashed we should not exit
%% and we should let the implementaion of type to deal with this
%% and we should let the implementation of type to deal with this
handle_info({'EXIT', PeerPid, _Other}, State) ->
exit_peer(PeerPid, State);

Expand Down
2 changes: 1 addition & 1 deletion test/chumak_acceptance_pub_with_sub.erl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ normal_test_() ->
{setup, fun start/0, fun stop/1, fun negotiate_subcriptions_with_matching/1}
}
, {
"Should resend subscriptions when reconnection ocurred",
"Should resend subscriptions when reconnection occurred",
{setup, fun start/0, fun stop/1, fun negotiate_subcriptions_with_reconnect/1}
}
, {
Expand Down
2 changes: 1 addition & 1 deletion test/chumak_acceptance_xpub_with_xsub.erl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ normal_test_() ->
{setup, fun start/0, fun stop/1, fun negotiate_subcriptions_with_matching/1}
}
, {
"Should resend subscriptions when reconnection ocurred",
"Should resend subscriptions when reconnection occurred",
{setup, fun start/0, fun stop/1, fun negotiate_subcriptions_with_reconnect/1}
}
, {
Expand Down

0 comments on commit 16708cb

Please sign in to comment.