summaryrefslogtreecommitdiffstats
path: root/x11vnc/keyboard.c
diff options
context:
space:
mode:
authorrunge <runge>2006-03-28 05:43:04 +0000
committerrunge <runge>2006-03-28 05:43:04 +0000
commit5920dc18d75a53690ed8690867f501c51595daf1 (patch)
tree4f2eb03ac80b27ba03dedaa1a4b32640703b3d02 /x11vnc/keyboard.c
parent10c61b53c275f125432fa20d8348aafcfed2bf93 (diff)
downloadlibtdevnc-5920dc18d75a53690ed8690867f501c51595daf1.tar.gz
libtdevnc-5920dc18d75a53690ed8690867f501c51595daf1.zip
SSL patch for Java viewer. https support for x11vnc.
Diffstat (limited to 'x11vnc/keyboard.c')
-rw-r--r--x11vnc/keyboard.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/x11vnc/keyboard.c b/x11vnc/keyboard.c
index 9003ee8..6a0ccc7 100644
--- a/x11vnc/keyboard.c
+++ b/x11vnc/keyboard.c
@@ -2098,6 +2098,16 @@ void initialize_allowed_input(void) {
while( (cl = rfbClientIteratorNext(iter)) ) {
ClientData *cd = (ClientData *) cl->clientData;
+ if (! cd) {
+ continue;
+ }
+#if 0
+rfbLog("cd: %p\n", cd);
+rfbLog("cd->input: %s\n", cd->input);
+rfbLog("cd->login_viewonly: %d\n", cd->login_viewonly);
+rfbLog("allowed_input_view_only: %s\n", allowed_input_view_only);
+#endif
+
if (cd->input[0] == '=') {
; /* custom setting */
} else if (cd->login_viewonly) {
@@ -2365,6 +2375,10 @@ void get_allowed_input(rfbClientPtr client, allowed_input_t *input) {
}
cd = (ClientData *) client->clientData;
+
+ if (! cd) {
+ return;
+ }
if (cd->input[0] != '-') {
str = cd->input;
@@ -2398,7 +2412,7 @@ void get_allowed_input(rfbClientPtr client, allowed_input_t *input) {
/* for -pipeinput mode */
static void pipe_keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) {
- int can_input = 0, uid;
+ int can_input = 0, uid = 0;
allowed_input_t input;
char *name;
ClientData *cd = (ClientData *) client->clientData;
@@ -2413,7 +2427,9 @@ static void pipe_keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) {
can_input = 1; /* XXX distinguish later */
}
}
- uid = cd->uid;
+ if (cd) {
+ uid = cd->uid;
+ }
if (! can_input) {
uid = -uid;
}