Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: bmiklautz/FreeRDP
...
head fork: bmiklautz/FreeRDP
  • 5 commits
  • 3 files changed
  • 0 commit comments
  • 4 contributors
Commits on Mar 27, 2012
Anthony atong cache: fix BITMAP_CACHE_WAITING_LIST_INDEX handling 87fb68b
Dorian Johnson libfreerdp-utils: make freerdp_append_shared_library_suffix work when…
… file_path is shorter than the suffix, which is true for 'rail' and '.dylib'.
b489d51
Marc-André Moreau awakecoding Merge pull request #516 from atong/master
cache: fix BITMAP_CACHE_WAITING_LIST_INDEX handling
6d94e30
Marc-André Moreau awakecoding Merge pull request #517 from dorianj/master
libfreerdp-utils: fix freerdp_append_shared_library_suffix on OS X
87d3c3e
Commits on Mar 28, 2012
jsorg71 jsorg71 libfreerdp-cache: complete update_pointer_color b1a8082
19 libfreerdp-cache/bitmap.c
View
@@ -173,9 +173,10 @@ rdpBitmap* bitmap_cache_get(rdpBitmapCache* bitmap_cache, uint32 id, uint32 inde
}
if (index == BITMAP_CACHE_WAITING_LIST_INDEX)
- index = bitmap_cache->cells[id].number - 1;
-
- if (index > bitmap_cache->cells[id].number)
+ {
+ index = bitmap_cache->cells[id].number;
+ }
+ else if (index > bitmap_cache->cells[id].number)
{
printf("get invalid bitmap index %d in cell id: %d\n", index, id);
return NULL;
@@ -195,9 +196,10 @@ void bitmap_cache_put(rdpBitmapCache* bitmap_cache, uint32 id, uint32 index, rdp
}
if (index == BITMAP_CACHE_WAITING_LIST_INDEX)
- index = bitmap_cache->cells[id].number - 1;
-
- if (index > bitmap_cache->cells[id].number)
+ {
+ index = bitmap_cache->cells[id].number;
+ }
+ else if (index > bitmap_cache->cells[id].number)
{
printf("put invalid bitmap index %d in cell id: %d\n", index, id);
return;
@@ -255,7 +257,8 @@ rdpBitmapCache* bitmap_cache_new(rdpSettings* settings)
for (i = 0; i < (int) bitmap_cache->maxCells; i++)
{
bitmap_cache->cells[i].number = settings->bitmapCacheV2CellInfo[i].numEntries;
- bitmap_cache->cells[i].entries = (rdpBitmap**) xzalloc(sizeof(rdpBitmap*) * bitmap_cache->cells[i].number);
+ /* allocate an extra entry for BITMAP_CACHE_WAITING_LIST_INDEX */
+ bitmap_cache->cells[i].entries = (rdpBitmap**) xzalloc(sizeof(rdpBitmap*) * bitmap_cache->cells[i].number + 1);
}
}
@@ -271,7 +274,7 @@ void bitmap_cache_free(rdpBitmapCache* bitmap_cache)
{
for (i = 0; i < (int) bitmap_cache->maxCells; i++)
{
- for (j = 0; j < (int) bitmap_cache->cells[i].number; j++)
+ for (j = 0; j < (int) bitmap_cache->cells[i].number + 1; j++)
{
bitmap = bitmap_cache->cells[i].entries[j];
20 libfreerdp-cache/pointer.c
View
@@ -46,7 +46,27 @@ void update_pointer_system(rdpContext* context, POINTER_SYSTEM_UPDATE* pointer_s
void update_pointer_color(rdpContext* context, POINTER_COLOR_UPDATE* pointer_color)
{
+ rdpPointer* pointer;
+ rdpCache* cache = context->cache;
+
+ pointer = Pointer_Alloc(context);
+
+ if (pointer != NULL)
+ {
+ pointer->xorBpp = 24;
+ pointer->xPos = pointer_color->xPos;
+ pointer->yPos = pointer_color->yPos;
+ pointer->width = pointer_color->width;
+ pointer->height = pointer_color->height;
+ pointer->lengthAndMask = pointer_color->lengthAndMask;
+ pointer->lengthXorMask = pointer_color->lengthXorMask;
+ pointer->xorMaskData = pointer_color->xorMaskData;
+ pointer->andMaskData = pointer_color->andMaskData;
+ pointer->New(context, pointer);
+ pointer_cache_put(cache->pointer, pointer_color->cacheIndex, pointer);
+ Pointer_Set(context, pointer);
+ }
}
void update_pointer_new(rdpContext* context, POINTER_NEW_UPDATE* pointer_new)
3  libfreerdp-utils/file.c
View
@@ -156,7 +156,8 @@ char* freerdp_append_shared_library_suffix(char* file_path)
}
else
{
- path = xstrdup(file_path);
+ path = xmalloc(file_path_length + shared_lib_suffix_length + 1);
+ sprintf(path, "%s%s", file_path, SHARED_LIB_SUFFIX);
}
return path;

No commit comments for this range

Something went wrong with that request. Please try again.