Skip to content

Commit

Permalink
Problem: some comments contain typos
Browse files Browse the repository at this point in the history
  • Loading branch information
c-rack committed Sep 6, 2015
1 parent 3e43258 commit bd923f0
Show file tree
Hide file tree
Showing 46 changed files with 74 additions and 74 deletions.
2 changes: 1 addition & 1 deletion src/curve_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ namespace zmq
// Cookie received from server
uint8_t cn_cookie [16 + 80];

// Intermediary buffer used to seepd up boxing and unboxing.
// Intermediary buffer used to speed up boxing and unboxing.
uint8_t cn_precom [crypto_box_BEFORENMBYTES];

// Nonce
Expand Down
6 changes: 3 additions & 3 deletions src/decoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace zmq
// This class implements the state machine that parses the incoming buffer.
// Derived class should implement individual state machine actions.
//
// Buffer managment is done by an allocator policy.
// Buffer management is done by an allocator policy.
template <typename T, typename A = c_single_allocator>
class decoder_base_t : public i_decoder
{
Expand Down Expand Up @@ -99,11 +99,11 @@ namespace zmq
}

// Processes the data in the buffer previously allocated using
// get_buffer function. size_ argument specifies nemuber of bytes
// get_buffer function. size_ argument specifies number of bytes
// actually filled into the buffer. Function returns 1 when the
// whole message was decoded or 0 when more data is required.
// On error, -1 is returned and errno set accordingly.
// Number of bytes processed is returned in byts_used_.
// Number of bytes processed is returned in bytes_used_.
int decode (const unsigned char *data_, std::size_t size_,
std::size_t &bytes_used_)
{
Expand Down
4 changes: 2 additions & 2 deletions src/decoder_allocators.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ namespace zmq
c_single_allocator& operator = (c_single_allocator const&);
};

// This allocater allocates a reference counted buffer which is used by v2_decoder_t
// This allocator allocates a reference counted buffer which is used by v2_decoder_t
// to use zero-copy msg::init_data to create messages with memory from this buffer as
// data storage.
//
Expand All @@ -102,7 +102,7 @@ namespace zmq
// Allocate a new buffer
//
// This releases the current buffer to be bound to the lifetime of the messages
// created on this bufer.
// created on this buffer.
unsigned char* allocate ();

// force deallocation of buffer.
Expand Down
2 changes: 1 addition & 1 deletion src/dist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ int zmq::dist_t::send_to_matching (msg_t *msg_)
// Push the message to matching pipes.
distribute (msg_);

// If mutlipart message is fully sent, activate all the eligible pipes.
// If multipart message is fully sent, activate all the eligible pipes.
if (!msg_more)
active = eligible;

Expand Down
2 changes: 1 addition & 1 deletion src/fq.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ namespace zmq
// there are following parts still waiting in the current pipe.
bool more;

// Holds credential after the last_acive_pipe has terminated.
// Holds credential after the last_active_pipe has terminated.
blob_t saved_credential;

fq_t (const fq_t&);
Expand Down
2 changes: 1 addition & 1 deletion src/i_decoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace zmq
virtual void resize_buffer(size_t) = 0;
// Decodes data pointed to by data_.
// When a message is decoded, 1 is returned.
// When the decoder needs more data, 0 is returnd.
// When the decoder needs more data, 0 is returned.
// On error, -1 is returned and errno is set accordingly.
virtual int decode (const unsigned char *data_, size_t size_,
size_t &processed) = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/io_thread.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ namespace zmq

io_thread_t (zmq::ctx_t *ctx_, uint32_t tid_);

// Clean-up. If the thread was started, it's neccessary to call 'stop'
// Clean-up. If the thread was started, it's necessary to call 'stop'
// before invoking destructor. Otherwise the destructor would hang up.
~io_thread_t ();

Expand All @@ -70,7 +70,7 @@ namespace zmq
void out_event ();
void timer_event (int id_);

// Used by io_objects to retrieve the assciated poller object.
// Used by io_objects to retrieve the associated poller object.
poller_t *get_poller ();

// Command handlers.
Expand Down
4 changes: 2 additions & 2 deletions src/ipc_connecter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void zmq::ipc_connecter_t::process_term (int linger_)

void zmq::ipc_connecter_t::in_event ()
{
// We are not polling for incomming data, so we are actually called
// We are not polling for incoming data, so we are actually called
// because of error here. However, we can get error on out event as well
// on some platforms, so we'll simply handle both events in the same way.
out_event ();
Expand Down Expand Up @@ -216,7 +216,7 @@ int zmq::ipc_connecter_t::open ()
s, addr->resolved.ipc_addr->addr (),
addr->resolved.ipc_addr->addrlen ());

// Connect was successfull immediately.
// Connect was successful immediately.
if (rc == 0)
return 0;

Expand Down
4 changes: 2 additions & 2 deletions src/ipc_connecter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ namespace zmq
int get_new_reconnect_ivl ();

// Open IPC connecting socket. Returns -1 in case of error,
// 0 if connect was successfull immediately. Returns -1 with
// 0 if connect was successful immediately. Returns -1 with
// EAGAIN errno if async connect was launched.
int open ();

// Close the connecting socket.
int close ();

// Get the file descriptor of newly created connection. Returns
// retired_fd if the connection was unsuccessfull.
// retired_fd if the connection was unsuccessful.
fd_t connect ();

// Address to connect to. Owned by session_base_t.
Expand Down
4 changes: 2 additions & 2 deletions src/ipc_listener.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ namespace zmq
// if the connection was dropped while waiting in the listen backlog.
fd_t accept ();

// True, if the undelying file for UNIX domain socket exists.
// True, if the underlying file for UNIX domain socket exists.
bool has_file;

// Name of the file associated with the UNIX domain address.
Expand All @@ -96,7 +96,7 @@ namespace zmq
// Handle corresponding to the listening socket.
handle_t handle;

// Socket the listerner belongs to.
// Socket the listener belongs to.
zmq::socket_base_t *socket;

// String representation of endpoint to bind to
Expand Down
2 changes: 1 addition & 1 deletion src/mechanism.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace zmq
{

// Abstract class representing security mechanism.
// Different mechanism extedns this class.
// Different mechanism extends this class.

class msg_t;

Expand Down
2 changes: 1 addition & 1 deletion src/mtrie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ bool zmq::mtrie_t::add_helper (unsigned char *prefix_, size_t size_,
if (c < min || c >= min + count) {

// The character is out of range of currently handled
// charcters. We have to extend the table.
// characters. We have to extend the table.
if (!count) {
min = c;
count = 1;
Expand Down
2 changes: 1 addition & 1 deletion src/norm_engine.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ namespace zmq
bool tx_more_bit;
bool zmq_output_ready; // zmq has msg(s) to send
bool norm_tx_ready; // norm has tx queue vacancy
// tbd - maybe don't need buffer if can access zmq message buffer directly?
// TBD - maybe don't need buffer if can access zmq message buffer directly?
char tx_buffer[BUFFER_SIZE];
unsigned int tx_index;
unsigned int tx_len;
Expand Down
2 changes: 1 addition & 1 deletion src/object.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ namespace zmq
void send_reaped ();
void send_done ();

// These handlers can be overrided by the derived objects. They are
// These handlers can be overridden by the derived objects. They are
// called when command arrives from another thread.
virtual void process_stop ();
virtual void process_plug ();
Expand Down
2 changes: 1 addition & 1 deletion src/options.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ namespace zmq
bool raw_socket;
bool raw_notify; // Provide connect notifications

// Addres of SOCKS proxy
// Address of SOCKS proxy
std::string socks_proxy_address;

// TCP keep-alive settings.
Expand Down
2 changes: 1 addition & 1 deletion src/own.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ void zmq::own_t::terminate ()
if (terminating)
return;

// As for the root of the ownership tree, there's noone to terminate it,
// As for the root of the ownership tree, there's no one to terminate it,
// so it has to terminate itself.
if (!owner) {
process_term (options.linger);
Expand Down
6 changes: 3 additions & 3 deletions src/own.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ namespace zmq
// specific type of the owned object correctly.
virtual ~own_t ();

// Term handler is protocted rather than private so that it can
// Term handler is protected rather than private so that it can
// be intercepted by the derived class. This is useful to add custom
// steps to the beginning of the termination process.
void process_term (int linger_);

// A place to hook in when phyicallal destruction of the object
// A place to hook in when physical destruction of the object
// is to be delayed.
virtual void process_destroy ();

Expand All @@ -119,7 +119,7 @@ namespace zmq
void process_term_ack ();
void process_seqnum ();

// Check whether all the peding term acks were delivered.
// Check whether all the pending term acks were delivered.
// If so, deallocate this object.
void check_term_acks ();

Expand Down
2 changes: 1 addition & 1 deletion src/pgm_receiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ void zmq::pgm_receiver_t::in_event ()
zmq_assert (offset <= insize);
zmq_assert (it->second.decoder == NULL);

// We have to move data to the begining of the first message.
// We have to move data to the beginning of the first message.
inpos += offset;
insize -= offset;

Expand Down
12 changes: 6 additions & 6 deletions src/pgm_sender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#include "wire.hpp"
#include "stdint.hpp"

zmq::pgm_sender_t::pgm_sender_t (io_thread_t *parent_,
zmq::pgm_sender_t::pgm_sender_t (io_thread_t *parent_,
const options_t &options_) :
io_object_t (parent_),
has_tx_timer (false),
Expand Down Expand Up @@ -77,7 +77,7 @@ int zmq::pgm_sender_t::init (bool udp_encapsulation_, const char *network_)

void zmq::pgm_sender_t::plug (io_thread_t *io_thread_, session_base_t *session_)
{
// Alocate 2 fds for PGM socket.
// Allocate 2 fds for PGM socket.
fd_t downlink_socket_fd = retired_fd;
fd_t uplink_socket_fd = retired_fd;
fd_t rdata_notify_fd = retired_fd;
Expand All @@ -91,11 +91,11 @@ void zmq::pgm_sender_t::plug (io_thread_t *io_thread_, session_base_t *session_)

handle = add_fd (downlink_socket_fd);
uplink_handle = add_fd (uplink_socket_fd);
rdata_notify_handle = add_fd (rdata_notify_fd);
rdata_notify_handle = add_fd (rdata_notify_fd);
pending_notify_handle = add_fd (pending_notify_fd);

// Set POLLIN. We wont never want to stop polling for uplink = we never
// want to stop porocess NAKs.
// want to stop processing NAKs.
set_pollin (uplink_handle);
set_pollin (rdata_notify_handle);
set_pollin (pending_notify_handle);
Expand Down Expand Up @@ -169,11 +169,11 @@ void zmq::pgm_sender_t::in_event ()

void zmq::pgm_sender_t::out_event ()
{
// POLLOUT event from send socket. If write buffer is empty,
// POLLOUT event from send socket. If write buffer is empty,
// try to read new data from the encoder.
if (write_size == 0) {

// First two bytes (sizeof uint16_t) are used to store message
// First two bytes (sizeof uint16_t) are used to store message
// offset in following steps. Note that by passing our buffer to
// the get data function we prevent it from returning its own buffer.
unsigned char *bf = out_buffer + sizeof (uint16_t);
Expand Down
4 changes: 2 additions & 2 deletions src/pipe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ void zmq::pipe_t::process_activate_read ()

void zmq::pipe_t::process_activate_write (uint64_t msgs_read_)
{
// Remember the peers's message sequence number.
// Remember the peer's message sequence number.
peers_msgs_read = msgs_read_;

if (!out_active && state == active) {
Expand Down Expand Up @@ -385,7 +385,7 @@ void zmq::pipe_t::terminate (bool delay_)
// Overload the value specified at pipe creation.
delay = delay_;

// If terminate was already called, we can ignore the duplicit invocation.
// If terminate was already called, we can ignore the duplicate invocation.
if (state == term_req_sent1 || state == term_req_sent2) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/req.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ int zmq::req_t::xsend (msg_t *msg_)

message_begins = false;

// Eat all currently avaliable messages before the request is fully
// Eat all currently available messages before the request is fully
// sent. This is done to avoid:
// REQ sends request to A, A replies, B replies too.
// A's reply was first and matches, that is used.
Expand Down
2 changes: 1 addition & 1 deletion src/req.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ namespace zmq
private:

// If true, request was already sent and reply wasn't received yet or
// was raceived partially.
// was received partially.
bool receiving_reply;

// If true, we are starting to send/recv a message. The first part
Expand Down
2 changes: 1 addition & 1 deletion src/router.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ bool zmq::router_t::xhas_in ()
bool zmq::router_t::xhas_out ()
{
// In theory, ROUTER socket is always ready for writing. Whether actual
// attempt to write succeeds depends on whitch pipe the message is going
// attempt to write succeeds depends on which pipe the message is going
// to be routed to.
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/select.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ namespace zmq
// Checks if an fd_entry_t is retired.
static bool is_retired_fd (const fd_entry_t &entry);

// Set of file descriptors that are used to retreive
// Set of file descriptors that are used to retrieve
// information for fd_set.
typedef std::vector <fd_entry_t> fd_set_t;
fd_set_t fds;
Expand Down
2 changes: 1 addition & 1 deletion src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ bool zmq::server_t::xhas_in ()
bool zmq::server_t::xhas_out ()
{
// In theory, SERVER socket is always ready for writing. Whether actual
// attempt to write succeeds depends on whitch pipe the message is going
// attempt to write succeeds depends on which pipe the message is going
// to be routed to.
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions src/signaler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ int zmq::signaler_t::wait (int timeout_)
{
#ifdef HAVE_FORK
if (unlikely (pid != getpid ())) {
// we have forked and the file descriptor is closed. Emulate an interupt
// we have forked and the file descriptor is closed. Emulate an interrupt
// response.
//printf("Child process %d signaler_t::wait returning simulating interrupt #1\n", getpid());
errno = EINTR;
Expand All @@ -238,7 +238,7 @@ int zmq::signaler_t::wait (int timeout_)
#ifdef HAVE_FORK
else
if (unlikely (pid != getpid ())) {
// we have forked and the file descriptor is closed. Emulate an interupt
// we have forked and the file descriptor is closed. Emulate an interrupt
// response.
//printf("Child process %d signaler_t::wait returning simulating interrupt #2\n", getpid());
errno = EINTR;
Expand Down
2 changes: 1 addition & 1 deletion src/signaler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ namespace zmq

private:

// Creates a pair of filedescriptors that will be used
// Creates a pair of file descriptors that will be used
// to pass the signals.
static int make_fdpair (fd_t *r_, fd_t *w_);

Expand Down
Loading

0 comments on commit bd923f0

Please sign in to comment.