summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2010-05-21 10:51:03 +0200
committerAlexander Larsson <alexl@redhat.com>2010-05-21 10:51:28 +0200
commit012bd2577975b902aa5ce0cdd0eb43ef57c948fb (patch)
tree1dc3de75ad4c173d2de3f60cb0c9d78bf4517542 /server
parentd351bb35ce981d39e839528f4a23bc5b501adab8 (diff)
downloadspice-012bd2577975b902aa5ce0cdd0eb43ef57c948fb.tar.gz
spice-012bd2577975b902aa5ce0cdd0eb43ef57c948fb.tar.xz
spice-012bd2577975b902aa5ce0cdd0eb43ef57c948fb.zip
Fix spelling errors in comments and strings
Diffstat (limited to 'server')
-rw-r--r--server/glz_encode_match_tmpl.c4
-rw-r--r--server/glz_encode_tmpl.c4
-rw-r--r--server/glz_encoder.c4
-rw-r--r--server/glz_encoder.h6
-rw-r--r--server/glz_encoder_dictionary.c6
-rw-r--r--server/glz_encoder_dictionary.h10
-rw-r--r--server/glz_encoder_dictionary_protected.h18
-rw-r--r--server/red_bitmap_utils.h2
-rw-r--r--server/red_memslots.c2
-rw-r--r--server/red_tunnel_worker.c36
-rw-r--r--server/red_worker.c30
-rw-r--r--server/reds.c34
-rw-r--r--server/reds.h2
13 files changed, 79 insertions, 79 deletions
diff --git a/server/glz_encode_match_tmpl.c b/server/glz_encode_match_tmpl.c
index e72a6c26..bba44dcd 100644
--- a/server/glz_encode_match_tmpl.c
+++ b/server/glz_encode_match_tmpl.c
@@ -24,7 +24,7 @@
/* if image_distance = 0, pixel_distance is the distance between the matching pixels.
Otherwise, it is the offset from the beginning of the referred image */
-#if defined(GLZ_ENCODE_MATCH) /* actually perfroming the encoding */
+#if defined(GLZ_ENCODE_MATCH) /* actually performing the encoding */
static INLINE void encode_match(Encoder *encoder, uint32_t image_distance,
size_t pixel_distance, size_t len)
#elif defined(GLZ_ENCODE_SIZE) /* compute the size of the encoding except for the match length*/
@@ -59,7 +59,7 @@ static INLINE int get_encode_ref_size(uint32_t image_distance, size_t pixel_dist
#endif
- /* encoding the rest of the pixel ditsance and the image_dist and its 2 control bits */
+ /* encoding the rest of the pixel distance and the image_dist and its 2 control bits */
/* The first 2 MSB bits indicate how many more bytes should be read for image dist */
if (pixel_distance < MAX_PIXEL_SHORT_DISTANCE) {
diff --git a/server/glz_encode_tmpl.c b/server/glz_encode_tmpl.c
index 5d73df70..359a25b1 100644
--- a/server/glz_encode_tmpl.c
+++ b/server/glz_encode_tmpl.c
@@ -156,11 +156,11 @@ static INLINE size_t FNAME(do_match)(SharedDictionary *dict,
const PIXEL *tmp_ref = ref;
if (ref > (ref_limit - MIN_REF_ENCODE_SIZE)) {
- return 0; // in case the hash entry is not relvant
+ return 0; // in case the hash entry is not relevant
}
- /* min match lenght == MIN_REF_ENCODE_SIZE (depends on pixel type) */
+ /* min match length == MIN_REF_ENCODE_SIZE (depends on pixel type) */
if (!SAME_PIXEL(*tmp_ref, *tmp_ip)) {
return 0;
diff --git a/server/glz_encoder.c b/server/glz_encoder.c
index f745f2a6..89b759c3 100644
--- a/server/glz_encoder.c
+++ b/server/glz_encoder.c
@@ -234,12 +234,12 @@ int glz_encode(GlzEncoderContext *opaque_encoder,
if (stride > (width / PLT_PIXELS_PER_BYTE[type])) {
if (((width % PLT_PIXELS_PER_BYTE[type]) == 0) || (
(stride - (width / PLT_PIXELS_PER_BYTE[type])) > 1)) {
- encoder->usr->error(encoder->usr, "sride overflows (plt)\n");
+ encoder->usr->error(encoder->usr, "stride overflows (plt)\n");
}
}
} else {
if (stride != width * RGB_BYTES_PER_PIXEL[type]) {
- encoder->usr->error(encoder->usr, "sride != width*bytes_per_pixel (rgb)\n");
+ encoder->usr->error(encoder->usr, "stride != width*bytes_per_pixel (rgb)\n");
}
}
diff --git a/server/glz_encoder.h b/server/glz_encoder.h
index 0fd34d77..6c4d2b38 100644
--- a/server/glz_encoder.h
+++ b/server/glz_encoder.h
@@ -34,8 +34,8 @@ void glz_encoder_destroy(GlzEncoderContext *opaque_encoder);
/*
assumes width is in pixels and stride is in bytes
- usr_context : when an image is released from the window due to capicity overflow,
- usr_context is given as a parmater to the free_image callback.
+ usr_context : when an image is released from the window due to capacity overflow,
+ usr_context is given as a parameter to the free_image callback.
o_enc_dict_context: if glz_enc_dictionary_remove_image is called, it should be
called with the o_enc_dict_context that is associated with
the image.
@@ -43,7 +43,7 @@ void glz_encoder_destroy(GlzEncoderContext *opaque_encoder);
return: the number of bytes in the compressed data and sets o_enc_dict_context
NOTE : currently supports only rgb images in which width*bytes_per_pixel = stride OR
- palette images in which stride eqauls the min number of bytes to hold a line.
+ palette images in which stride equals the min number of bytes to hold a line.
The stride should be > 0
*/
int glz_encode(GlzEncoderContext *opaque_encoder, LzImageType type, int width, int height,
diff --git a/server/glz_encoder_dictionary.c b/server/glz_encoder_dictionary.c
index 94898805..de8963df 100644
--- a/server/glz_encoder_dictionary.c
+++ b/server/glz_encoder_dictionary.c
@@ -363,7 +363,7 @@ static INLINE void __glz_dictionary_window_free_image(SharedDictionary *dict, Wi
dict->window.free_images = image;
}
-/* moves all the segments that were associaed with the images to the free segments */
+/* moves all the segments that were associated with the images to the free segments */
static INLINE void __glz_dictionary_window_free_image_segs(SharedDictionary *dict,
WindowImage *image)
{
@@ -436,7 +436,7 @@ static INLINE int glz_dictionary_is_in_use(SharedDictionary *dict)
static void glz_dictionary_window_remove_head(SharedDictionary *dict, uint32_t encoder_id,
WindowImage *end_image)
{
- // note that the segs list heads (one per econder) may be different than the
+ // note that the segs list heads (one per encoder) may be different than the
// used_segs_head and it is updated somewhere else
while (dict->window.used_images_head != end_image) {
WindowImage *image = dict->window.used_images_head;
@@ -532,7 +532,7 @@ static WindowImage *glz_dictionary_window_add_image(SharedDictionary *dict, LzIm
// see glz_encode_tmpl::compress).
// Thus, the 'next' field of the list's tail can be accessed only
// after all the new tail's data was set. Note that we are relying on
- // an atomic assignment (32 bit varaible).
+ // an atomic assignment (32 bit variable).
// For the other thread that may read 'next' of the old tail, NULL_IMAGE_SEG_ID
// is equivalent to a segment with an image id that is different
// from the image id of the tail, so we don't need to further protect this field.
diff --git a/server/glz_encoder_dictionary.h b/server/glz_encoder_dictionary.h
index ff4b96ee..a85db6e8 100644
--- a/server/glz_encoder_dictionary.h
+++ b/server/glz_encoder_dictionary.h
@@ -24,7 +24,7 @@
/*
Interface for maintaining lz dictionary that is shared among several encoders.
The interface for accessing the dictionary for encoding purposes is located in
- glz_encoder_diciotnary_protected.h
+ glz_encoder_dictionary_protected.h
*/
typedef void GlzEncDictContext;
@@ -38,7 +38,7 @@ typedef struct GlzEncDictRestoreData {
} GlzEncDictRestoreData;
/* size : maximal number of pixels occupying the window
- max_encoders: maximal number of encoders that use the dicitionary
+ max_encoders: maximal number of encoders that use the dictionary
usr : callbacks */
GlzEncDictContext *glz_enc_dictionary_create(uint32_t size, uint32_t max_encoders,
GlzEncoderUsrContext *usr);
@@ -49,7 +49,7 @@ void glz_enc_dictionary_destroy(GlzEncDictContext *opaque_dict, GlzEncoderUsrCon
uint32_t glz_enc_dictionary_get_size(GlzEncDictContext *);
/* returns the current state of the dictionary.
- NOTE - you should use it only when no encoder uses the dicitonary. */
+ NOTE - you should use it only when no encoder uses the dictionary. */
void glz_enc_dictionary_get_restore_data(GlzEncDictContext *opaque_dict,
GlzEncDictRestoreData *out_data,
GlzEncoderUsrContext *usr);
@@ -58,11 +58,11 @@ void glz_enc_dictionary_get_restore_data(GlzEncDictContext *opaque_dict,
GlzEncDictContext *glz_enc_dictionary_restore(GlzEncDictRestoreData *restore_data,
GlzEncoderUsrContext *usr);
-/* NOTE - you should use this routine only when no encoder uses the dicitonary. */
+/* NOTE - you should use this routine only when no encoder uses the dictionary. */
void glz_enc_dictionary_reset(GlzEncDictContext *opaque_dict, GlzEncoderUsrContext *usr);
/* image: the context returned by the encoder when the image was encoded.
- NOTE - you should use this routine only when no encoder uses the dicitonary.*/
+ NOTE - you should use this routine only when no encoder uses the dictionary.*/
void glz_enc_dictionary_remove_image(GlzEncDictContext *opaque_dict,
GlzEncDictImageContext *image, GlzEncoderUsrContext *usr);
diff --git a/server/glz_encoder_dictionary_protected.h b/server/glz_encoder_dictionary_protected.h
index 812468b0..a594c5fa 100644
--- a/server/glz_encoder_dictionary_protected.h
+++ b/server/glz_encoder_dictionary_protected.h
@@ -56,7 +56,7 @@ struct WindowImage {
#define NULL_IMAGE_SEG_ID MAX_IMAGE_SEGS_NUM
#define INIT_IMAGE_SEGS_NUM 1000
-/* Images can be seperated into several chunks. The basic unit of the
+/* Images can be separated into several chunks. The basic unit of the
dictionary window is one image segment. Each segment is encoded separately.
An encoded match can refer to only one segment.*/
struct WindowImageSegment {
@@ -66,7 +66,7 @@ struct WindowImageSegment {
uint32_t pixels_num; // Number of pixels in the segment
uint64_t pixels_so_far; // Total no. pixels passed through the window till this segment.
// NOTE - never use size delta independently. It should
- // always be used with respect to a previouse size delta
+ // always be used with respect to a previous size delta
uint32_t next;
};
@@ -80,7 +80,7 @@ struct __attribute__ ((__packed__)) HashEntry {
struct SharedDictionary {
struct {
/* The segments storage. A dynamic array.
- By reffering to a segment by its index, insetad of address,
+ By referring to a segment by its index, instead of address,
we save space in the hash entries (32bit instead of 64bit) */
WindowImageSegment *segs;
uint32_t segs_quota;
@@ -89,8 +89,8 @@ struct SharedDictionary {
array in order to keep the indices of the segments consistent
after reallocation */
- /* the window in a resultion of image segments */
- uint32_t used_segs_head; // the lateset head
+ /* the window in a resolution of image segments */
+ uint32_t used_segs_head; // the latest head
uint32_t used_segs_tail;
uint32_t free_segs_head;
@@ -99,7 +99,7 @@ struct SharedDictionary {
// The head is NULL_IMAGE_SEG_ID when the encoder is
// not encoding.
- /* the window in a resultion of images. But here the head contains the oldest head*/
+ /* the window in a resolution of images. But here the head contains the oldest head*/
WindowImage* used_images_tail;
WindowImage* used_images_head;
WindowImage* free_images;
@@ -108,7 +108,7 @@ struct SharedDictionary {
uint32_t size_limit; // max number of pixels in a window (per encoder)
} window;
- /* Concurrency issues: the reading/wrting of each entry field should be atomic.
+ /* Concurrency issues: the reading/writing of each entry field should be atomic.
It is allowed that the reading/writing of the whole entry won't be atomic,
since before we access a reference we check its validity*/
#ifdef CHAINED_HASH
@@ -130,8 +130,8 @@ struct SharedDictionary {
If possible, release images from the head of the window.
Also perform concurrency related operations.
- usr_image_context: when an image is released from the window due to capicity overflow,
- usr_image_context is given as a parmater to the free_image callback.
+ usr_image_context: when an image is released from the window due to capacity overflow,
+ usr_image_context is given as a parameter to the free_image callback.
image_head_dist : the number of images between the current image and the head of the
window that is associated with the encoder.
diff --git a/server/red_bitmap_utils.h b/server/red_bitmap_utils.h
index 7ae3d888..1f26eb4a 100644
--- a/server/red_bitmap_utils.h
+++ b/server/red_bitmap_utils.h
@@ -108,7 +108,7 @@ static inline double FNAME(pixels_square_score)(PIXEL *line1, PIXEL *line2)
all_ident = all_ident && (!cmp_res);
ret += FNAME(PIX_PAIR_SCORE)[cmp_res];
- // ignore squares where al pixels are identical
+ // ignore squares where all pixels are identical
if (all_ident) {
ret -= (FNAME(PIX_PAIR_SCORE)[0]) * 3;
}
diff --git a/server/red_memslots.c b/server/red_memslots.c
index d660ef47..bc428d53 100644
--- a/server/red_memslots.c
+++ b/server/red_memslots.c
@@ -55,7 +55,7 @@ unsigned long get_virt_delta(RedMemSlotInfo *info, unsigned long addr, int group
slot_id = get_memslot_id(info, addr);
if (slot_id > info->num_memslots) {
- PANIC("slod_id %d too big", slot_id);
+ PANIC("slot_id %d too big", slot_id);
}
slot = &info->mem_slots[group_id][slot_id];
diff --git a/server/red_tunnel_worker.c b/server/red_tunnel_worker.c
index 210de9d3..e331a1af 100644
--- a/server/red_tunnel_worker.c
+++ b/server/red_tunnel_worker.c
@@ -226,7 +226,7 @@ typedef struct RedSocketInData {
uint32_t num_buffers;
- int32_t num_tokens; // No. tokens conusmed by slirp since the last token msg sent to the
+ int32_t num_tokens; // No. tokens consumed by slirp since the last token msg sent to the
// client. can be negative if we loaned some to the client (when the
// ready queue is empty)
uint32_t client_total_num_tokens;
@@ -474,13 +474,13 @@ static inline void tunnel_channel_activate_migrated_sockets(TunnelChannel *chann
/*******************************************************************************************/
/* use for signaling that 1) subroutines failed 2)routines in the interface for slirp
- failed (which triggred from a call to slirp) */
+ failed (which triggered from a call to slirp) */
#define SET_TUNNEL_ERROR(channel,format, ...) { \
channel->tunnel_error = TRUE; \
red_printf(format, ## __VA_ARGS__); \
}
-/* should be checked after each subroutine that may cause error or fter calls to slirp routines */
+/* should be checked after each subroutine that may cause error or after calls to slirp routines */
#define CHECK_TUNNEL_ERROR(channel) (channel->tunnel_error)
struct TunnelChannel {
@@ -1542,7 +1542,7 @@ static int tunnel_channel_handle_socket_closed(TunnelChannel *channel, RedSocket
net_slirp_socket_abort(sckt->slirp_sckt);
} else if ((sckt->slirp_status != SLIRP_SCKT_STATUS_WAIT_CLOSE) ||
(prev_client_status != CLIENT_SCKT_STATUS_SHUTDOWN_SEND)) {
- // slirp can be in wait close if both slirp and client sent fin perviously
+ // slirp can be in wait close if both slirp and client sent fin previously
// otherwise, the prev client status would also have been wait close, and this
// case was handled above
red_printf("unexpected slirp_status=%d", sckt->slirp_status);
@@ -1570,7 +1570,7 @@ static int tunnel_channel_handle_socket_closed_ack(TunnelChannel *channel, RedSo
}
if (sckt->slirp_status != SLIRP_SCKT_STATUS_CLOSED) {
- red_printf("unexcpected SPICE_MSGC_TUNNEL_SOCKET_CLOSED_ACK slirp_status=%d",
+ red_printf("unexpected SPICE_MSGC_TUNNEL_SOCKET_CLOSED_ACK slirp_status=%d",
sckt->slirp_status);
return FALSE;
}
@@ -1584,12 +1584,12 @@ static int tunnel_channel_handle_socket_receive_data(TunnelChannel *channel, Red
{
if ((sckt->client_status == CLIENT_SCKT_STATUS_SHUTDOWN_SEND) ||
(sckt->client_status == CLIENT_SCKT_STATUS_CLOSED)) {
- red_printf("unexcpected SPICE_MSGC_TUNNEL_SOCKET_DATA clinet_status=%d",
+ red_printf("unexpected SPICE_MSGC_TUNNEL_SOCKET_DATA client_status=%d",
sckt->client_status);
return FALSE;
}
- // handling a case where the client sent data before it recieved the close msg
+ // handling a case where the client sent data before it received the close msg
if ((sckt->slirp_status != SLIRP_SCKT_STATUS_OPEN) &&
(sckt->slirp_status != SLIRP_SCKT_STATUS_SHUTDOWN_SEND)) {
__tunnel_worker_free_socket_rcv_buf(sckt->worker, recv_data);
@@ -1606,7 +1606,7 @@ static int tunnel_channel_handle_socket_receive_data(TunnelChannel *channel, Red
tunnel_socket_assign_rcv_buf(sckt, recv_data, buf_size);
if (!sckt->in_data.client_total_num_tokens) {
- red_printf("token vailoation");
+ red_printf("token violation");
return FALSE;
}
@@ -1915,7 +1915,7 @@ static void __restore_ready_chunks_queue(RedSocket *sckt, ReadyTunneledChunkQueu
}
// not using the alloc_buf cb of the queue, since we may want to create the migrated buffers
-// with other properties (e.g., not releasing tokent)
+// with other properties (e.g., not releasing token)
static void __restore_process_queue(RedSocket *sckt, TunneledBufferProcessQueue *queue,
uint8_t *data, int size,
socket_alloc_buffer_proc_t alloc_buf)
@@ -2711,7 +2711,7 @@ static void tunnel_channel_send_socket_out_data(TunnelChannel *channel, PipeItem
}
if (!sckt->out_data.num_tokens) {
- return; // only when an we will recieve tokens, data will be sent again.
+ return; // only when an we will receive tokens, data will be sent again.
}
ASSERT(sckt->out_data.ready_chunks_queue.head);
@@ -2767,7 +2767,7 @@ static void tunnel_worker_release_socket_out_data(TunnelWorker *worker, PipeItem
sckt_out_data->data_size -= sckt_out_data->push_tail_size;
- // compansation. was substructed in the previous lines
+ // compensation. was subtracted in the previous lines
sckt_out_data->data_size += sckt_out_data->ready_chunks_queue.offset;
if (sckt_out_data->push_tail_size == sckt_out_data->push_tail->size) {
@@ -2784,8 +2784,8 @@ static void tunnel_worker_release_socket_out_data(TunnelWorker *worker, PipeItem
// can still send data to socket
if (__client_socket_can_receive(sckt)) {
if (sckt_out_data->ready_chunks_queue.head) {
- // the pipe item may alreay be linked, if for example the send was
- // blocked and before it finshed and called release, tunnel_socket_send was called
+ // the pipe item may already be linked, if for example the send was
+ // blocked and before it finished and called release, tunnel_socket_send was called
if (!red_channel_pipe_item_is_linked(
&worker->channel->base, &sckt_out_data->data_pipe_item)) {
sckt_out_data->data_pipe_item.type = PIPE_ITEM_TYPE_SOCKET_DATA;
@@ -3097,7 +3097,7 @@ static int tunnel_socket_recv(SlirpUsrNetworkInterface *usr_interface, UserSocke
if ((sckt->slirp_status == SLIRP_SCKT_STATUS_SHUTDOWN_RECV) ||
(sckt->slirp_status == SLIRP_SCKT_STATUS_WAIT_CLOSE)) {
- SET_TUNNEL_ERROR(worker->channel, "recieve was shutdown");
+ SET_TUNNEL_ERROR(worker->channel, "receive was shutdown");
tunnel_shutdown(worker);
errno = ECONNRESET;
return -1;
@@ -3155,8 +3155,8 @@ static void null_tunnel_socket_shutdown_send(SlirpUsrNetworkInterface *usr_inter
{
}
-// can be called : 1) when a FIN is reqested from the guset 2) after shutdown rcv that was called
-// after recieved failed because the client socket was sent FIN
+// can be called : 1) when a FIN is requested from the guest 2) after shutdown rcv that was called
+// after received failed because the client socket was sent FIN
static void tunnel_socket_shutdown_send(SlirpUsrNetworkInterface *usr_interface, UserSocket *opaque)
{
TunnelWorker *worker;
@@ -3269,7 +3269,7 @@ static void null_tunnel_socket_close(SlirpUsrNetworkInterface *usr_interface, Us
// was caused by an error
}
-// can be called during migration due to the channel diconnect. But it does not affect the
+// can be called during migration due to the channel disconnect. But it does not affect the
// migrate data
static void tunnel_socket_close(SlirpUsrNetworkInterface *usr_interface, UserSocket *opaque)
{
@@ -3289,7 +3289,7 @@ static void tunnel_socket_close(SlirpUsrNetworkInterface *usr_interface, UserSoc
sckt->slirp_status = SLIRP_SCKT_STATUS_CLOSED;
- // if sckt is not opened yet, close will be sent when we recieve connect ack
+ // if sckt is not opened yet, close will be sent when we receive connect ack
if ((sckt->client_status == CLIENT_SCKT_STATUS_OPEN) ||
(sckt->client_status == CLIENT_SCKT_STATUS_SHUTDOWN_SEND)) {
// check if there is still data to send. the close will be sent after data is released.
diff --git a/server/red_worker.c b/server/red_worker.c
index f509ea2e..c89adf18 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -584,7 +584,7 @@ typedef struct {
typedef struct RedGlzDrawable RedGlzDrawable;
-/* for each qxl drawable, there may be serveral instances of lz drawables */
+/* for each qxl drawable, there may be several instances of lz drawables */
typedef struct GlzDrawableInstanceItem {
RingItem glz_link;
RingItem free_link;
@@ -1185,7 +1185,7 @@ static void show_qxl_drawable(RedWorker *worker, QXLDrawable *drawable, const ch
case QXL_DRAW_TEXT:
break;
default:
- red_error("bad rawable type");
+ red_error("bad drawable type");
}
printf("\n");
}
@@ -1601,7 +1601,7 @@ static inline void release_drawable(RedWorker *worker, Drawable *item)
if (item->red_glz_drawable) {
item->red_glz_drawable->drawable = NULL;
- } else { // no refernce to the qxl drawable left
+ } else { // no reference to the qxl drawable left
free_qxl_drawable(worker, item->qxl_drawable, item->group_id, item->self_bitmap,
item->surface_id);
}
@@ -3837,7 +3837,7 @@ static inline void red_process_drawable(RedWorker *worker, QXLDrawable *drawable
/*
surface->refs is affected by a drawable (that is
dependent on the surface) as long as the drawable is alive.
- However, surfce->depend_on_me is affected by a drawable only
+ However, surface->depend_on_me is affected by a drawable only
as long as it is in the current tree (hasn't been rendered yet).
*/
red_inc_surfaces_drawable_dependencies(worker, item);
@@ -4521,7 +4521,7 @@ static void red_draw_qxl_drawable(RedWorker *worker, Drawable *drawable)
break;
}
default:
- red_printf("invlaid type");
+ red_printf("invalid type");
}
unlocalize_clip(&clip);
}
@@ -5225,7 +5225,7 @@ static RedGlzDrawable *red_display_get_glz_drawable(DisplayChannel *channel, Dra
static GlzDrawableInstanceItem *red_display_add_glz_drawable_instance(RedGlzDrawable *glz_drawable)
{
ASSERT(glz_drawable->instances_count < MAX_GLZ_DRAWABLE_INSTANCES);
- // NOTE: We assume the addtions are performed consecutively, without removals in the middle
+ // NOTE: We assume the additions are performed consecutively, without removals in the middle
GlzDrawableInstanceItem *ret = glz_drawable->instances_pool + glz_drawable->instances_count;
glz_drawable->instances_count++;
@@ -5239,10 +5239,10 @@ static GlzDrawableInstanceItem *red_display_add_glz_drawable_instance(RedGlzDraw
}
/* Remove from the to_free list and the instances_list.
- When no instance is left - the RedGlzDrawable is released too. (and the qxl drawblae too, if
+ When no instance is left - the RedGlzDrawable is released too. (and the qxl drawable too, if
it is not used by Drawable).
NOTE - 1) can be called only by the display channel that created the drawable
- 2) it is assumed that the instance was already removed from the dicitonary*/
+ 2) it is assumed that the instance was already removed from the dictionary*/
static void red_display_free_glz_drawable_instance(DisplayChannel *channel,
GlzDrawableInstanceItem *glz_drawable_instance)
{
@@ -5258,7 +5258,7 @@ static void red_display_free_glz_drawable_instance(DisplayChannel *channel,
ring_remove(&glz_drawable_instance->glz_link);
glz_drawable->instances_count--;
- // whan the remove callback is performed from the channel that the
+ // when the remove callback is performed from the channel that the
// drawable belongs to, the instance is not added to the 'to_free' list
if (ring_item_is_linked(&glz_drawable_instance->free_link)) {
ring_remove(&glz_drawable_instance->free_link);
@@ -5303,7 +5303,7 @@ static void red_display_handle_glz_drawables_to_free(DisplayChannel* channel)
/* releases all the instances of the drawable from the dictionary and the display channel.
The release of the last instance will also release the drawable itself and the qxl drawable
if possible.
- NOTE - the caller should prevent encoding using the dicitonary during this operation*/
+ NOTE - the caller should prevent encoding using the dictionary during this operation*/
static void red_display_free_glz_drawable(DisplayChannel *channel, RedGlzDrawable *drawable)
{
RingItem *head_instance = ring_get_head(&drawable->instances);
@@ -5332,7 +5332,7 @@ static void red_display_free_glz_drawable(DisplayChannel *channel, RedGlzDrawabl
}
/* Clear all lz drawables - enforce their removal from the global dictionary.
- NOTE - prevents encoding using the dicitonary during the operation*/
+ NOTE - prevents encoding using the dictionary during the operation*/
static void red_display_clear_glz_drawables(DisplayChannel *channel)
{
RingItem *ring_link;
@@ -5356,7 +5356,7 @@ static void red_display_clear_glz_drawables(DisplayChannel *channel)
/* Remove from the global lz dictionary some glz_drawables that have no reference to
Drawable (their qxl drawables are released too).
- NOTE - the caller should prevent encoding using the dicitonary during the operation*/
+ NOTE - the caller should prevent encoding using the dictionary during the operation*/
static int red_display_free_some_independent_glz_drawables(DisplayChannel *channel)
{
int n = 0;
@@ -6916,7 +6916,7 @@ static inline uint8_t *red_get_image_line(RedWorker *worker, QXLDataChunk **chun
}
if (data_size - *offset < stride) {
- red_printf("bad chunk aligment");
+ red_printf("bad chunk alignment");
return NULL;
}
ret = (*chunk)->data + *offset;
@@ -8126,7 +8126,7 @@ static inline void flush_display_commands(RedWorker *worker)
red_receive(channel);
red_send_data(channel, NULL);
if (red_now() >= end_time) {
- red_printf("update timout");
+ red_printf("update timeout");
red_disconnect_display((RedChannel *)worker->display_channel);
} else {
sleep_count++;
@@ -9497,7 +9497,7 @@ void *red_worker_main(void *arg)
if (worker.display_channel && worker.display_channel->glz_dict) {
/* during migration, in the dest, the display channel can be initialized
while the global lz data not since migrate data msg hasn't been
- recieved yet */
+ received yet */
red_display_handle_glz_drawables_to_free(worker.display_channel);
}
diff --git a/server/reds.c b/server/reds.c
index bf66a0b4..189e8123 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -99,7 +99,7 @@ static void openssl_init();
#define MM_TIMER_GRANULARITY_MS (1000 / 30)
#define MM_TIME_DELTA 400 /*ms*/
-// approximate max recive message size
+// approximate max receive message size
#define RECIVE_BUF_SIZE \
(4096 + (REDS_AGENT_WINDOW_SIZE + REDS_NUM_INTERNAL_AGENT_MESSAGES) * SPICE_AGENT_MAX_DATA_SIZE)
@@ -1467,7 +1467,7 @@ static int main_channel_restore_vdi_read_state(MainMigrateData *data, uint8_t **
switch (state->read_state) {
case VDI_PORT_READ_STATE_READ_HADER:
if (data->read_buf_len) {
- red_printf("unexpected recive buf");
+ red_printf("unexpected receive buf");
reds_disconnect();
return FALSE;
}
@@ -1475,13 +1475,13 @@ static int main_channel_restore_vdi_read_state(MainMigrateData *data, uint8_t **
break;
case VDI_PORT_READ_STATE_GET_BUFF:
if (state->message_recive_len > state->vdi_chunk_header.size) {
- red_printf("invalid message recive len");
+ red_printf("invalid message receive len");
reds_disconnect();
return FALSE;
}
if (data->read_buf_len) {
- red_printf("unexpected recive buf");
+ red_printf("unexpected receive buf");
reds_disconnect();
return FALSE;
}
@@ -1497,7 +1497,7 @@ static int main_channel_restore_vdi_read_state(MainMigrateData *data, uint8_t **
}
if (state->message_recive_len > state->vdi_chunk_header.size) {
- red_printf("invalid message recive len");
+ red_printf("invalid message receive len");
reds_disconnect();
return FALSE;
}
@@ -1680,7 +1680,7 @@ static void reds_main_handle_message(void *opaque, SpiceDataHeader *message)
VDAgentExtBuf *buf;
if (!reds->agent_state.num_client_tokens) {
- red_printf("token vailoation");
+ red_printf("token violation");
reds_disconnect();
break;
}
@@ -1788,7 +1788,7 @@ static void reds_main_handle_message(void *opaque, SpiceDataHeader *message)
// probably high load on client or server result with incorrect values
letancy = 0;
red_printf("net test: invalid values, letancy %lu roundtrip %lu. assuming high"
- "bendwidth", letancy, roundtrip);
+ "bandwidth", letancy, roundtrip);
break;
}
bitrate_per_sec = (uint64_t)(NET_TEST_BYTES * 8) * 1000000 / (roundtrip - letancy);
@@ -1991,7 +1991,7 @@ static int reds_send_link_error(RedLinkInfo *link, uint32_t error)
static void reds_show_new_channel(RedLinkInfo *link)
{
- red_printf("channel %d:%d, connected sucessfully, over %s link",
+ red_printf("channel %d:%d, connected successfully, over %s link",
link->link_mess->channel_type,
link->link_mess->channel_id,
link->peer->ssl == NULL ? "Non Secure" : "Secure");
@@ -2516,7 +2516,7 @@ static void reds_handle_other_links(RedLinkInfo *link)
if (link_mess->channel_type == SPICE_CHANNEL_INPUTS && !link->peer->ssl) {
SimpleOutItem *item;
SpiceMsgNotify *notify;
- char *mess = "keybord channel is unsecure";
+ char *mess = "keyboard channel is insecure";
const int mess_len = strlen(mess);
if (!(item = new_simple_out_item(SPICE_MSG_NOTIFY, sizeof(SpiceMsgNotify) + mess_len + 1))) {
@@ -3419,7 +3419,7 @@ __visible__ int spice_server_add_interface(SpiceServer *s,
}
if (interface->major_version != SPICE_INTERFACE_KEYBOARD_MAJOR ||
interface->minor_version < SPICE_INTERFACE_KEYBOARD_MINOR) {
- red_printf("unsuported keyboard interface");
+ red_printf("unsupported keyboard interface");
return -1;
}
keyboard = SPICE_CONTAINEROF(sin, SpiceKbdInstance, base);
@@ -3433,7 +3433,7 @@ __visible__ int spice_server_add_interface(SpiceServer *s,
}
if (interface->major_version != SPICE_INTERFACE_MOUSE_MAJOR ||
interface->minor_version < SPICE_INTERFACE_MOUSE_MINOR) {
- red_printf("unsuported mouse interface");
+ red_printf("unsupported mouse interface");
return -1;
}
mouse = SPICE_CONTAINEROF(sin, SpiceMouseInstance, base);
@@ -3445,7 +3445,7 @@ __visible__ int spice_server_add_interface(SpiceServer *s,
red_printf("SPICE_INTERFACE_QXL");
if (interface->major_version != SPICE_INTERFACE_QXL_MAJOR ||
interface->minor_version < SPICE_INTERFACE_QXL_MINOR) {
- red_printf("unsuported qxl interface");
+ red_printf("unsupported qxl interface");
return -1;
}
@@ -3462,7 +3462,7 @@ __visible__ int spice_server_add_interface(SpiceServer *s,
}
if (interface->major_version != SPICE_INTERFACE_TABLET_MAJOR ||
interface->minor_version < SPICE_INTERFACE_TABLET_MINOR) {
- red_printf("unsuported tablet interface");
+ red_printf("unsupported tablet interface");
return -1;
}
tablet = SPICE_CONTAINEROF(sin, SpiceTabletInstance, base);
@@ -3479,7 +3479,7 @@ __visible__ int spice_server_add_interface(SpiceServer *s,
red_printf("SPICE_INTERFACE_PLAYBACK");
if (interface->major_version != SPICE_INTERFACE_PLAYBACK_MAJOR ||
interface->minor_version < SPICE_INTERFACE_PLAYBACK_MINOR) {
- red_printf("unsuported playback interface");
+ red_printf("unsupported playback interface");
return -1;
}
snd_attach_playback(SPICE_CONTAINEROF(sin, SpicePlaybackInstance, base));
@@ -3488,7 +3488,7 @@ __visible__ int spice_server_add_interface(SpiceServer *s,
red_printf("SPICE_INTERFACE_RECORD");
if (interface->major_version != SPICE_INTERFACE_RECORD_MAJOR ||
interface->minor_version < SPICE_INTERFACE_RECORD_MINOR) {
- red_printf("unsuported record interface");
+ red_printf("unsupported record interface");
return -1;
}
snd_attach_record(SPICE_CONTAINEROF(sin, SpiceRecordInstance, base));
@@ -3501,7 +3501,7 @@ __visible__ int spice_server_add_interface(SpiceServer *s,
}
if (interface->major_version != SPICE_INTERFACE_VDI_PORT_MAJOR ||
interface->minor_version < SPICE_INTERFACE_VDI_PORT_MINOR) {
- red_printf("unsuported vdi port interface");
+ red_printf("unsupported vdi port interface");
return -1;
}
attach_to_red_agent(SPICE_CONTAINEROF(sin, SpiceVDIPortInstance, base));
@@ -3516,7 +3516,7 @@ __visible__ int spice_server_add_interface(SpiceServer *s,
}
if (interface->major_version != SPICE_INTERFACE_NET_WIRE_MAJOR ||
interface->minor_version < SPICE_INTERFACE_NET_WIRE_MINOR) {
- red_printf("unsuported net wire interface");
+ red_printf("unsupported net wire interface");
return -1;
}
net = SPICE_CONTAINEROF(sin, SpiceNetWireInstance, base);
diff --git a/server/reds.h b/server/reds.h
index b9d53365..6eed02be 100644
--- a/server/reds.h
+++ b/server/reds.h
@@ -31,7 +31,7 @@ typedef struct RedsStreamContext {
SpiceWatch *watch;
/* set it to TRUE if you shutdown the socket. shutdown read doesn't work as accepted -
- receive may return data afterwards. check the flag before calling receive*/
+ receive may return data afterward. check the flag before calling receive*/
int shutdown;
SSL *ssl;