Enhance debug logging of SHM related functions

ulab-next-nosound
Timothy Pearson 6 years ago
parent e284e1c09d
commit 4cddff1210

@ -3322,12 +3322,12 @@ g_text2bool(const char *s)
}
/*****************************************************************************/
/* returns pointer or nil on error */
/* returns pointer or -1 on error */
void * APP_CC
g_shmat(int shmid)
{
#if defined(_WIN32)
return 0;
return -1;
#else
return shmat(shmid, 0, 0);
#endif

@ -32,6 +32,7 @@
#include <unistd.h>
#include <fcntl.h>
#include <netdb.h>
#include <errno.h>
/******************************************************************************/
/**
@ -1202,6 +1203,7 @@ process_server_paint_rect_shmem(struct mod *amod, struct stream *s)
amod->screen_shmem_id = 0;
amod->screen_shmem_pixels = 0;
amod->screen_shmem_id_mapped = 0;
log_message(LOG_LEVEL_ERROR, "g_shmat() returned error, errno: %d\nIs X11rdp running on the same host as xrdp?\n", errno);
}
else
{
@ -1313,6 +1315,7 @@ process_server_paint_rect_shmem_ex(struct mod *amod, struct stream *s)
amod->screen_shmem_id = 0;
amod->screen_shmem_pixels = 0;
amod->screen_shmem_id_mapped = 0;
log_message(LOG_LEVEL_ERROR, "g_shmat() returned error, errno: %d\nIs X11rdp running on the same host as xrdp?\n", errno);
}
else
{

Loading…
Cancel
Save