mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-01-05 04:02:43 +00:00
Fix some misspelled identifiers
severty -> severity SpiceResorceID -> SpiceResourceID SpiceResorceList -> SpiceResourceList resorces -> resources ped_size -> pad_size postition -> position
This commit is contained in:
parent
d69b0829a6
commit
f9da2720ae
@ -580,8 +580,8 @@ void CursorChannel::handle_reset(RedPeer::InMessage *message)
|
||||
void CursorChannel::handle_cursor_set(RedPeer::InMessage* message)
|
||||
{
|
||||
SpiceMsgCursorSet* set = (SpiceMsgCursorSet*)message->data();
|
||||
set_cursor(set->cursor, message->size() - sizeof(SpiceMsgCursorSet), set->postition.x,
|
||||
set->postition.y, set->visible != 0);
|
||||
set_cursor(set->cursor, message->size() - sizeof(SpiceMsgCursorSet), set->position.x,
|
||||
set->position.y, set->visible != 0);
|
||||
}
|
||||
|
||||
void CursorChannel::handle_cursor_move(RedPeer::InMessage* message)
|
||||
@ -594,8 +594,8 @@ void CursorChannel::handle_cursor_move(RedPeer::InMessage* message)
|
||||
|
||||
Lock lock(_update_lock);
|
||||
_cursor_visible = true;
|
||||
int dx = move->postition.x - _hot_pos.x;
|
||||
int dy = move->postition.y - _hot_pos.y;
|
||||
int dx = move->position.x - _hot_pos.x;
|
||||
int dy = move->position.y - _hot_pos.y;
|
||||
_hot_pos.x += dx;
|
||||
_hot_pos.y += dy;
|
||||
_cursor_rect.left += dx;
|
||||
|
||||
@ -158,7 +158,7 @@ public:
|
||||
SpiceRect* dest, int clip_type, uint32_t num_clip_rects, SpiceRect* clip_rects);
|
||||
~VideoStream();
|
||||
|
||||
void push_data(uint32_t mm_time, uint32_t length, uint8_t* data, uint32_t ped_size);
|
||||
void push_data(uint32_t mm_time, uint32_t length, uint8_t* data, uint32_t pad_size);
|
||||
void set_clip(int type, uint32_t num_clip_rects, SpiceRect* clip_rects);
|
||||
const SpiceRect& get_dest() {return _dest;}
|
||||
void handle_update_mark(uint64_t update_mark);
|
||||
@ -445,7 +445,7 @@ uint32_t VideoStream::alloc_frame_slot()
|
||||
return frame_slot(_frames_head++);
|
||||
}
|
||||
|
||||
void VideoStream::push_data(uint32_t mm_time, uint32_t length, uint8_t* data, uint32_t ped_size)
|
||||
void VideoStream::push_data(uint32_t mm_time, uint32_t length, uint8_t* data, uint32_t pad_size)
|
||||
{
|
||||
maintenance();
|
||||
uint32_t frame_slot = alloc_frame_slot();
|
||||
@ -622,7 +622,7 @@ DisplayChannel::DisplayChannel(RedClient& client, uint32_t id,
|
||||
|
||||
handler->set_handler(SPICE_MSG_DISPLAY_INVAL_LIST,
|
||||
&DisplayChannel::handle_inval_list,
|
||||
sizeof(SpiceResorceList));
|
||||
sizeof(SpiceResourceList));
|
||||
handler->set_handler(SPICE_MSG_DISPLAY_INVAL_ALL_PIXMAPS,
|
||||
&DisplayChannel::handle_inval_all_pixmaps,
|
||||
sizeof(SpiceMsgWaitForChannels));
|
||||
@ -1251,19 +1251,19 @@ void DisplayChannel::handle_reset(RedPeer::InMessage *message)
|
||||
|
||||
void DisplayChannel::handle_inval_list(RedPeer::InMessage* message)
|
||||
{
|
||||
SpiceResorceList *inval_list = (SpiceResorceList *)message->data();
|
||||
SpiceResourceList *inval_list = (SpiceResourceList *)message->data();
|
||||
|
||||
if (message->size() <
|
||||
sizeof(*inval_list) + inval_list->count * sizeof(inval_list->resorces[0])) {
|
||||
sizeof(*inval_list) + inval_list->count * sizeof(inval_list->resources[0])) {
|
||||
THROW("access violation");
|
||||
}
|
||||
|
||||
for (int i = 0; i < inval_list->count; i++) {
|
||||
if (inval_list->resorces[i].type != SPICE_RES_TYPE_PIXMAP) {
|
||||
if (inval_list->resources[i].type != SPICE_RES_TYPE_PIXMAP) {
|
||||
THROW("invalid res type");
|
||||
}
|
||||
|
||||
_pixmap_cache.remove(inval_list->resorces[i].id);
|
||||
_pixmap_cache.remove(inval_list->resources[i].id);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1357,12 +1357,12 @@ void DisplayChannel::handle_stream_data(RedPeer::InMessage* message)
|
||||
THROW("invalid stream");
|
||||
}
|
||||
|
||||
if (message->size() < sizeof(SpiceMsgDisplayStreamData) + stream_data->data_size + stream_data->ped_size) {
|
||||
if (message->size() < sizeof(SpiceMsgDisplayStreamData) + stream_data->data_size + stream_data->pad_size) {
|
||||
THROW("access violation");
|
||||
}
|
||||
|
||||
stream->push_data(stream_data->multi_media_time, stream_data->data_size, stream_data->data,
|
||||
stream_data->ped_size);
|
||||
stream_data->pad_size);
|
||||
}
|
||||
|
||||
void DisplayChannel::handle_stream_clip(RedPeer::InMessage* message)
|
||||
|
||||
@ -675,10 +675,10 @@ void RedChannel::handle_notify(RedPeer::InMessage* message)
|
||||
static const char* visibility_strings[] = {"!", "!!", "!!!"};
|
||||
|
||||
|
||||
if (notify->severty > SPICE_NOTIFY_SEVERITY_ERROR) {
|
||||
if (notify->severity > SPICE_NOTIFY_SEVERITY_ERROR) {
|
||||
THROW("bad severity");
|
||||
}
|
||||
sevirity = sevirity_strings[notify->severty];
|
||||
sevirity = sevirity_strings[notify->severity];
|
||||
|
||||
if (notify->visibilty > SPICE_NOTIFY_VISIBILITY_HIGH) {
|
||||
THROW("bad visibility");
|
||||
|
||||
@ -521,7 +521,7 @@ typedef struct WaitForChannels {
|
||||
|
||||
typedef struct FreeList {
|
||||
int res_size;
|
||||
SpiceResorceList *res;
|
||||
SpiceResourceList *res;
|
||||
uint64_t sync[MAX_CACHE_CLIENTS];
|
||||
WaitForChannels wait;
|
||||
} FreeList;
|
||||
@ -6807,17 +6807,17 @@ static void display_channel_push_release(DisplayChannel *channel, uint8_t type,
|
||||
}
|
||||
|
||||
if (free_list->res->count == free_list->res_size) {
|
||||
SpiceResorceList *new_list;
|
||||
new_list = spice_malloc(sizeof(*new_list) + free_list->res_size * sizeof(SpiceResorceID) * 2);
|
||||
SpiceResourceList *new_list;
|
||||
new_list = spice_malloc(sizeof(*new_list) + free_list->res_size * sizeof(SpiceResourceID) * 2);
|
||||
new_list->count = free_list->res->count;
|
||||
memcpy(new_list->resorces, free_list->res->resorces,
|
||||
new_list->count * sizeof(SpiceResorceID));
|
||||
memcpy(new_list->resources, free_list->res->resources,
|
||||
new_list->count * sizeof(SpiceResourceID));
|
||||
free(free_list->res);
|
||||
free_list->res = new_list;
|
||||
free_list->res_size *= 2;
|
||||
}
|
||||
free_list->res->resorces[free_list->res->count].type = type;
|
||||
free_list->res->resorces[free_list->res->count++].id = id;
|
||||
free_list->res->resources[free_list->res->count].type = type;
|
||||
free_list->res->resources[free_list->res->count++].id = id;
|
||||
}
|
||||
|
||||
static inline void red_begin_send_massage(RedChannel *channel, void *item)
|
||||
@ -6869,7 +6869,7 @@ static inline void display_begin_send_massage(DisplayChannel *channel, void *ite
|
||||
}
|
||||
sub_header[sub_index].type = SPICE_MSG_DISPLAY_INVAL_LIST;
|
||||
sub_header[sub_index].size = sizeof(*free_list->res) + free_list->res->count *
|
||||
sizeof(free_list->res->resorces[0]);
|
||||
sizeof(free_list->res->resources[0]);
|
||||
add_buf((RedChannel*)channel, BUF_TYPE_RAW, &sub_header[sub_index], sizeof(*sub_header), 0,
|
||||
0);
|
||||
add_buf((RedChannel*)channel, BUF_TYPE_RAW, free_list->res, sub_header[sub_index].size, 0,
|
||||
@ -7169,7 +7169,7 @@ static inline int red_send_stream_data(DisplayChannel *display_channel, Drawable
|
||||
stream_data->id = stream - worker->streams_buf;
|
||||
stream_data->multi_media_time = drawable->qxl_drawable->mm_time;
|
||||
stream_data->data_size = n;
|
||||
stream_data->ped_size = PADDING;
|
||||
stream_data->pad_size = PADDING;
|
||||
display_begin_send_massage(display_channel, NULL);
|
||||
agent->lats_send_time = time_now;
|
||||
return TRUE;
|
||||
@ -7520,7 +7520,7 @@ static void red_send_local_cursor(CursorChannel *cursor_channel, LocalCursor *cu
|
||||
|
||||
channel = &cursor_channel->base;
|
||||
channel->send_data.header.type = SPICE_MSG_CURSOR_SET;
|
||||
cursor_channel->send_data.u.cursor_set.postition = cursor->position;
|
||||
cursor_channel->send_data.u.cursor_set.position = cursor->position;
|
||||
cursor_channel->send_data.u.cursor_set.visible = channel->worker->cursor_visible;
|
||||
add_buf(channel, BUF_TYPE_RAW, &cursor_channel->send_data.u.cursor_set,
|
||||
sizeof(SpiceMsgCursorSet), 0, 0);
|
||||
@ -7553,13 +7553,13 @@ static void red_send_cursor(CursorChannel *cursor_channel, CursorItem *cursor)
|
||||
switch (cmd->type) {
|
||||
case QXL_CURSOR_MOVE:
|
||||
channel->send_data.header.type = SPICE_MSG_CURSOR_MOVE;
|
||||
cursor_channel->send_data.u.cursor_move.postition = cmd->u.position;
|
||||
cursor_channel->send_data.u.cursor_move.position = cmd->u.position;
|
||||
add_buf(channel, BUF_TYPE_RAW, &cursor_channel->send_data.u.cursor_move,
|
||||
sizeof(SpiceMsgCursorMove), 0, 0);
|
||||
break;
|
||||
case QXL_CURSOR_SET:
|
||||
channel->send_data.header.type = SPICE_MSG_CURSOR_SET;
|
||||
cursor_channel->send_data.u.cursor_set.postition = cmd->u.set.position;
|
||||
cursor_channel->send_data.u.cursor_set.position = cmd->u.set.position;
|
||||
cursor_channel->send_data.u.cursor_set.visible = channel->worker->cursor_visible;
|
||||
add_buf(channel, BUF_TYPE_RAW, &cursor_channel->send_data.u.cursor_set,
|
||||
sizeof(SpiceMsgCursorSet), 0, 0);
|
||||
@ -8763,8 +8763,8 @@ static void handle_new_display_channel(RedWorker *worker, RedsStreamContext *pee
|
||||
|
||||
|
||||
display_channel->send_data.free_list.res =
|
||||
spice_malloc(sizeof(SpiceResorceList) +
|
||||
DISPLAY_FREE_LIST_DEFAULT_SIZE * sizeof(SpiceResorceID));
|
||||
spice_malloc(sizeof(SpiceResourceList) +
|
||||
DISPLAY_FREE_LIST_DEFAULT_SIZE * sizeof(SpiceResourceID));
|
||||
display_channel->send_data.free_list.res_size = DISPLAY_FREE_LIST_DEFAULT_SIZE;
|
||||
red_ref_channel((RedChannel*)display_channel);
|
||||
on_new_display_channel(worker);
|
||||
|
||||
@ -2527,7 +2527,7 @@ static void reds_handle_other_links(RedLinkInfo *link)
|
||||
|
||||
notify = (SpiceMsgNotify *)item->data;
|
||||
notify->time_stamp = get_time_stamp();
|
||||
notify->severty = SPICE_NOTIFY_SEVERITY_WARN;
|
||||
notify->severity = SPICE_NOTIFY_SEVERITY_WARN;
|
||||
notify->visibilty = SPICE_NOTIFY_VISIBILITY_HIGH;
|
||||
notify->what = SPICE_WARN_GENERAL;
|
||||
notify->message_len = mess_len;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user