Commit 4088906b authored by runge's avatar runge

rebuild for x11vnc dev 0.9.8

parent ea30be6c
This diff is collapsed.
...@@ -91,6 +91,7 @@ int accept_client(rfbClientPtr client); ...@@ -91,6 +91,7 @@ int accept_client(rfbClientPtr client);
int run_user_command(char *cmd, rfbClientPtr client, char *mode, char *input, int run_user_command(char *cmd, rfbClientPtr client, char *mode, char *input,
int len, FILE *output); int len, FILE *output);
int check_access(char *addr); int check_access(char *addr);
void client_set_net(rfbClientPtr client);
static rfbClientPtr *client_match(char *str); static rfbClientPtr *client_match(char *str);
static void free_client_data(rfbClientPtr client); static void free_client_data(rfbClientPtr client);
...@@ -138,6 +139,7 @@ char *list_clients(void) { ...@@ -138,6 +139,7 @@ char *list_clients(void) {
iter = rfbGetClientIterator(screen); iter = rfbGetClientIterator(screen);
while( (cl = rfbClientIteratorNext(iter)) ) { while( (cl = rfbClientIteratorNext(iter)) ) {
client_set_net(cl);
count++; count++;
} }
rfbReleaseClientIterator(iter); rfbReleaseClientIterator(iter);
...@@ -156,6 +158,7 @@ char *list_clients(void) { ...@@ -156,6 +158,7 @@ char *list_clients(void) {
iter = rfbGetClientIterator(screen); iter = rfbGetClientIterator(screen);
while( (cl = rfbClientIteratorNext(iter)) ) { while( (cl = rfbClientIteratorNext(iter)) ) {
ClientData *cd = (ClientData *) cl->clientData; ClientData *cd = (ClientData *) cl->clientData;
if (! cd) { if (! cd) {
continue; continue;
} }
...@@ -411,6 +414,7 @@ int run_user_command(char *cmd, rfbClientPtr client, char *mode, char *input, ...@@ -411,6 +414,7 @@ int run_user_command(char *cmd, rfbClientPtr client, char *mode, char *input,
char str[100]; char str[100];
int rc, ok; int rc, ok;
ClientData *cd = NULL; ClientData *cd = NULL;
client_set_net(client);
if (client != NULL) { if (client != NULL) {
cd = (ClientData *) client->clientData; cd = (ClientData *) client->clientData;
addr = client->host; addr = client->host;
...@@ -2897,6 +2901,24 @@ void client_gone_chat_helper(rfbClientPtr client) { ...@@ -2897,6 +2901,24 @@ void client_gone_chat_helper(rfbClientPtr client) {
chat_window_client = NULL; chat_window_client = NULL;
} }
void client_set_net(rfbClientPtr client) {
ClientData *cd;
if (client == NULL) {
return;
}
cd = (ClientData *) client->clientData;
if (cd == NULL) {
return;
}
if (cd->client_port < 0) {
double dt = dnow();
cd->client_port = get_remote_port(client->sock);
cd->server_port = get_local_port(client->sock);
cd->server_ip = get_local_host(client->sock);
cd->hostname = ip2host(client->host);
rfbLog("client_set_net: %s %.4f\n", client->host, dnow() - dt);
}
}
/* /*
* libvncserver callback for when a new client connects * libvncserver callback for when a new client connects
*/ */
...@@ -2950,10 +2972,8 @@ enum rfbNewClientAction new_client(rfbClientPtr client) { ...@@ -2950,10 +2972,8 @@ enum rfbNewClientAction new_client(rfbClientPtr client) {
client->clientData = (void *) calloc(sizeof(ClientData), 1); client->clientData = (void *) calloc(sizeof(ClientData), 1);
cd = (ClientData *) client->clientData; cd = (ClientData *) client->clientData;
cd->client_port = get_remote_port(client->sock); /* see client_set_net() we delay the DNS lookups during handshake */
cd->server_port = get_local_port(client->sock); cd->client_port = -1;
cd->server_ip = get_local_host(client->sock);
cd->hostname = ip2host(client->host);
cd->username = strdup(""); cd->username = strdup("");
cd->unixname = strdup(""); cd->unixname = strdup("");
...@@ -3026,7 +3046,7 @@ enum rfbNewClientAction new_client(rfbClientPtr client) { ...@@ -3026,7 +3046,7 @@ enum rfbNewClientAction new_client(rfbClientPtr client) {
install_padded_fb(pad_geometry); install_padded_fb(pad_geometry);
} }
cd->timer = dnow(); cd->timer = last_new_client = dnow();
cd->send_cmp_rate = 0.0; cd->send_cmp_rate = 0.0;
cd->send_raw_rate = 0.0; cd->send_raw_rate = 0.0;
cd->latency = 0.0; cd->latency = 0.0;
...@@ -3347,6 +3367,7 @@ void check_new_clients(void) { ...@@ -3347,6 +3367,7 @@ void check_new_clients(void) {
ClientData *cd = (ClientData *) cl->clientData; ClientData *cd = (ClientData *) cl->clientData;
char *s; char *s;
client_set_net(cl);
if (! cd) { if (! cd) {
continue; continue;
} }
......
...@@ -70,5 +70,6 @@ extern int accept_client(rfbClientPtr client); ...@@ -70,5 +70,6 @@ extern int accept_client(rfbClientPtr client);
extern int run_user_command(char *cmd, rfbClientPtr client, char *mode, char *input, extern int run_user_command(char *cmd, rfbClientPtr client, char *mode, char *input,
int len, FILE *output); int len, FILE *output);
extern int check_access(char *addr); extern int check_access(char *addr);
extern void client_set_net(rfbClientPtr client);
#endif /* _X11VNC_CONNECTIONS_H */ #endif /* _X11VNC_CONNECTIONS_H */
...@@ -3858,6 +3858,9 @@ void watch_loop(void) { ...@@ -3858,6 +3858,9 @@ void watch_loop(void) {
} else { } else {
rfbPE(-1); rfbPE(-1);
} }
if (x11vnc_current < last_new_client + 0.5) {
urgent_update = 1;
}
unixpw_in_rfbPE = 0; unixpw_in_rfbPE = 0;
...@@ -3992,6 +3995,9 @@ void watch_loop(void) { ...@@ -3992,6 +3995,9 @@ void watch_loop(void) {
#endif #endif
continue; continue;
} }
if (x11vnc_current < last_new_client + 0.5 && !all_clients_initialized()) {
continue;
}
if (button_mask && (!show_dragging || pointer_mode == 0)) { if (button_mask && (!show_dragging || pointer_mode == 0)) {
/* /*
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
.TH X11VNC "1" "March 2009" "x11vnc " "User Commands" .TH X11VNC "1" "March 2009" "x11vnc " "User Commands"
.SH NAME .SH NAME
x11vnc - allow VNC connections to real X11 displays x11vnc - allow VNC connections to real X11 displays
version: 0.9.7, lastmod: 2009-03-15 version: 0.9.8, lastmod: 2009-03-30
.SH SYNOPSIS .SH SYNOPSIS
.B x11vnc .B x11vnc
[OPTION]... [OPTION]...
......
...@@ -550,6 +550,7 @@ extern int hack_val; ...@@ -550,6 +550,7 @@ extern int hack_val;
extern rfbClientPtr last_pointer_client; extern rfbClientPtr last_pointer_client;
extern rfbClientPtr latest_client; extern rfbClientPtr latest_client;
extern double last_client_gone; extern double last_client_gone;
extern double last_new_client;
extern int waited_for_client; extern int waited_for_client;
extern int findcreatedisplay; extern int findcreatedisplay;
......
...@@ -47,7 +47,7 @@ int xtrap_base_event_type = 0; ...@@ -47,7 +47,7 @@ int xtrap_base_event_type = 0;
int xdamage_base_event_type = 0; int xdamage_base_event_type = 0;
/* date +'lastmod: %Y-%m-%d' */ /* date +'lastmod: %Y-%m-%d' */
char lastmod[] = "0.9.7 lastmod: 2009-03-15"; char lastmod[] = "0.9.8 lastmod: 2009-03-30";
/* X display info */ /* X display info */
...@@ -187,6 +187,7 @@ int hack_val = 0; ...@@ -187,6 +187,7 @@ int hack_val = 0;
rfbClientPtr last_pointer_client = NULL; rfbClientPtr last_pointer_client = NULL;
rfbClientPtr latest_client = NULL; rfbClientPtr latest_client = NULL;
double last_client_gone = 0.0; double last_client_gone = 0.0;
double last_new_client = 0.0;
int waited_for_client = 0; int waited_for_client = 0;
int findcreatedisplay = 0; int findcreatedisplay = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment