Package list virt-viewer / c290303
Drop patches 0001-Really-fix-using-alternate-ssh-ports.patch - applied upstream http://git.fedorahosted.org/git/?p=virt-viewer.git;a=commitdiff;h=754011f2bc5696466de5f45c3781c7a0cd961b9a http://git.fedorahosted.org/git/?p=virt-viewer.git;a=commitdiff;h=1c00bc2b9541a553c0f6502dadc61eb56edfa355 http://git.fedorahosted.org/git/?p=virt-viewer.git;a=commitdiff;h=60145f31a6fb2c7331101ba4ee7d25d08dd7eb48 0002-ff-callbacks-must-be-invoked-from-a-clean-stack.patch - applied upstream http://git.fedorahosted.org/git/?p=virt-viewer.git;a=commitdiff;h=f3714e36625168fbd06b63e4b9979e7ea8258712 Laurent LĂ©onard 9 years ago
3 changed file(s) with 0 addition(s) and 166 deletion(s). Raw diff Collapse all Expand all
+0
-68
debian/patches/0001-Really-fix-using-alternate-ssh-ports.patch less more
0 From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
1 Date: Fri, 12 Aug 2011 19:05:11 +0200
2 Subject: Really fix using alternate ssh ports
3
4 Many,many thanks to Luca Capello for debugging this.
5
6 Closes: #637548
7 ---
8 src/virt-viewer-app.c | 18 ++++++++++++++----
9 1 files changed, 14 insertions(+), 4 deletions(-)
10
11 diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
12 index 918e788..6d3d9be 100644
13 --- a/src/virt-viewer-app.c
14 +++ b/src/virt-viewer-app.c
15 @@ -319,7 +319,7 @@ virt_viewer_app_open_tunnel_ssh(const char *sshhost,
16 int n = 0;
17
18 cmd[n++] = "ssh";
19 - if (!sshport) {
20 + if (sshport) {
21 cmd[n++] = "-p";
22 sprintf(portstr, "%d", sshport);
23 cmd[n++] = portstr;
24 @@ -635,6 +635,8 @@ virt_viewer_app_activate(VirtViewerApp *self)
25 if (priv->transport &&
26 g_strcasecmp(priv->transport, "ssh") == 0 &&
27 !priv->direct) {
28 + gchar *p = NULL;
29 +
30 if (priv->gport) {
31 virt_viewer_app_trace(self, "Opening indirect TCP connection to display at %s:%s\n",
32 priv->ghost, priv->gport);
33 @@ -642,14 +644,22 @@ virt_viewer_app_activate(VirtViewerApp *self)
34 virt_viewer_app_trace(self, "Opening indirect UNIX connection to display at %s\n",
35 priv->unixsock);
36 }
37 - virt_viewer_app_trace(self, "Setting up SSH tunnel via %s@%s:%d\n",
38 - priv->user, priv->host, priv->port ? priv->port : 22);
39 + if (priv->port)
40 + p = g_strdup_printf(":%d", priv->port);
41 +
42 + virt_viewer_app_trace(self, "Setting up SSH tunnel via %s%s%s%s\n",
43 + priv->user ? priv->user : "",
44 + priv->user ? "@" : "",
45 + priv->host, p ? p : "");
46 + g_free(p);
47
48 if ((fd = virt_viewer_app_open_tunnel_ssh(priv->host, priv->port,
49 priv->user, priv->ghost,
50 priv->gport, priv->unixsock)) < 0)
51 return -1;
52 } else if (priv->unixsock) {
53 +
54 +
55 virt_viewer_app_trace(self, "Opening direct UNIX connection to display at %s",
56 priv->unixsock);
57 if ((fd = virt_viewer_app_open_unix_sock(priv->unixsock)) < 0)
58 @@ -1311,7 +1321,7 @@ virt_viewer_app_set_connect_info(VirtViewerApp *self,
59 priv->transport = g_strdup(transport);
60 priv->unixsock = g_strdup(unixsock);
61 priv->user = g_strdup(user);
62 - priv->port = 0;
63 + priv->port = port;
64
65 virt_viewer_app_update_pretty_address(self);
66 }
67 --
+0
-96
debian/patches/0002-ff-callbacks-must-be-invoked-from-a-clean-stack.patch less more
0 From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
1 Date: Tue, 16 Aug 2011 08:36:13 -0700
2 Subject: ff callbacks must be invoked from a clean stack
3
4 If 'ff' callbacks are invoked directly from the remove
5 callback they will likely deadlock in libvirt. They must
6 be invoked from a clean stack, so switch to using a
7 glib idle callback.
8 ---
9 src/virt-viewer-events.c | 47 ++++++++++++++++++++++++++++++++++++++-------
10 1 files changed, 39 insertions(+), 8 deletions(-)
11
12 diff --git a/src/virt-viewer-events.c b/src/virt-viewer-events.c
13 index 108f97d..87df739 100644
14 --- a/src/virt-viewer-events.c
15 +++ b/src/virt-viewer-events.c
16 @@ -160,6 +160,23 @@ virt_viewer_events_update_handle(int watch,
17 }
18 }
19
20 +
21 +static gboolean
22 +virt_viewer_events_cleanup_handle(gpointer user_data)
23 +{
24 + struct virt_viewer_events_handle *data = user_data;
25 +
26 + DEBUG_LOG("Cleanup of handle %p", data);
27 + g_return_val_if_fail(data != NULL, FALSE);
28 +
29 + if (data->ff)
30 + (data->ff)(data->opaque);
31 +
32 + free(data);
33 + return FALSE;
34 +}
35 +
36 +
37 static int
38 virt_viewer_events_remove_handle(int watch)
39 {
40 @@ -172,13 +189,14 @@ virt_viewer_events_remove_handle(int watch)
41
42 DEBUG_LOG("Remove handle %d %d", watch, data->fd);
43
44 + if (!data->source)
45 + return -1;
46 +
47 g_source_remove(data->source);
48 data->source = 0;
49 data->events = 0;
50 - if (data->ff)
51 - (data->ff)(data->opaque);
52 - free(data);
53
54 + g_idle_add(virt_viewer_events_cleanup_handle, data);
55 return 0;
56 }
57
58 @@ -279,6 +297,23 @@ virt_viewer_events_update_timeout(int timer,
59 }
60 }
61
62 +
63 +static gboolean
64 +virt_viewer_events_cleanup_timeout(gpointer user_data)
65 +{
66 + struct virt_viewer_events_timeout *data = user_data;
67 +
68 + DEBUG_LOG("Cleanup of timeout %p", data);
69 + g_return_val_if_fail(data != NULL, FALSE);
70 +
71 + if (data->ff)
72 + (data->ff)(data->opaque);
73 +
74 + free(data);
75 + return FALSE;
76 +}
77 +
78 +
79 static int
80 virt_viewer_events_remove_timeout(int timer)
81 {
82 @@ -297,11 +332,7 @@ virt_viewer_events_remove_timeout(int timer)
83 g_source_remove(data->source);
84 data->source = 0;
85
86 - if (data->ff)
87 - (data->ff)(data->opaque);
88 -
89 - free(data);
90 -
91 + g_idle_add(virt_viewer_events_cleanup_timeout, data);
92 return 0;
93 }
94
95 --
+0
-2
debian/patches/series less more
0 0001-Really-fix-using-alternate-ssh-ports.patch
1 0002-ff-callbacks-must-be-invoked-from-a-clean-stack.patch