Package: vinagre / 3.22.0-8.1

freerdp2017.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
Description: Build with freerdp2

https://bugzilla.gnome.org/show_bug.cgi?id=765444

https://git.archlinux.org/svntogit/packages.git/tree/trunk/freerdp2017.diff?h=packages/vinagre

---
 configure.ac                  |    4 +--
 plugins/rdp/vinagre-rdp-tab.c |   45 ++++++++++++++++++++----------------------
 2 files changed, 24 insertions(+), 25 deletions(-)

--- a/configure.ac
+++ b/configure.ac
@@ -58,7 +58,7 @@ AS_IF([test "x$have_ssh" = "xyes"],
 AM_CONDITIONAL([VINAGRE_ENABLE_SSH], [test "x$have_ssh" = "xyes"])
 
 # Whether to enable support for RDP.
-RDP_DEPS="freerdp x11"
+RDP_DEPS="freerdp2 x11"
 AC_ARG_ENABLE([rdp],
   [AS_HELP_STRING([--disable-rdp],
     [Disable Remote Desktop Protocol (RDP) support])])
@@ -66,7 +66,7 @@ AC_ARG_ENABLE([rdp],
 AS_IF([test "x$enable_rdp" != "xno"],
   [PKG_CHECK_EXISTS([$RDP_DEPS],
     [have_rdp=yes
-     PKG_CHECK_EXISTS(freerdp >= 1.1,
+     PKG_CHECK_EXISTS(freerdp2 >= 1.1,
        [AC_DEFINE([HAVE_FREERDP_1_1], [1], [FreeRDP is of version 1.1 or newer])], [])],
     [have_rdp=no])],
   [have_rdp=no])
--- a/plugins/rdp/vinagre-rdp-tab.c
+++ b/plugins/rdp/vinagre-rdp-tab.c
@@ -474,16 +474,17 @@ frdp_drawing_area_draw (GtkWidget *area,
   return TRUE;
 }
 
-static void
+static BOOL
 frdp_begin_paint (rdpContext *context)
 {
   rdpGdi *gdi = context->gdi;
 
   gdi->primary->hdc->hwnd->invalid->null = 1;
   gdi->primary->hdc->hwnd->ninvalid = 0;
+  return TRUE;
 }
 
-static void
+static BOOL
 frdp_end_paint (rdpContext *context)
 {
   VinagreRdpTab        *rdp_tab = ((frdpContext *) context)->rdp_tab;
@@ -493,7 +494,7 @@ frdp_end_paint (rdpContext *context)
   gint                  x, y, w, h;
 
   if (gdi->primary->hdc->hwnd->invalid->null)
-    return;
+    return TRUE;
 
   x = gdi->primary->hdc->hwnd->invalid->x;
   y = gdi->primary->hdc->hwnd->invalid->y;
@@ -515,6 +516,7 @@ frdp_end_paint (rdpContext *context)
     {
       gtk_widget_queue_draw_area (priv->display, x, y, w, h);
     }
+  return TRUE;
 }
 
 static BOOL
@@ -585,15 +587,7 @@ frdp_post_connect (freerdp *instance)
   rdpGdi               *gdi;
   int                   stride;
 
-  gdi_init (instance,
-#if defined(FREERDP_VERSION_MAJOR) && defined(FREERDP_VERSION_MINOR) && \
-    !(FREERDP_VERSION_MAJOR > 1 || (FREERDP_VERSION_MAJOR == 1 && \
-    FREERDP_VERSION_MINOR >= 2))
-                    CLRBUF_24BPP,
-#else
-                    CLRBUF_32BPP,
-#endif
-                    NULL);
+  gdi_init (instance, PIXEL_FORMAT_BGRA32);
   gdi = instance->context->gdi;
 
   instance->update->BeginPaint = frdp_begin_paint;
@@ -969,11 +963,13 @@ frdp_authenticate (freerdp  *instance,
     }
 }
 
-static BOOL
+static DWORD
 frdp_certificate_verify (freerdp *instance,
-                         char    *subject,
-                         char    *issuer,
-                         char    *fingerprint)
+                         const char *common_name,
+                         const char *subject,
+                         const char *issuer,
+                         const char *fingerprint,
+                         BOOL host_mismatch)
 {
   VinagreTab *tab = VINAGRE_TAB (((frdpContext *) instance->context)->rdp_tab);
   GtkBuilder *builder;
@@ -1003,17 +999,20 @@ frdp_certificate_verify (freerdp *instan
   gtk_widget_hide (dialog);
 
 
-  return response == GTK_RESPONSE_YES;
+  return (response == GTK_RESPONSE_YES) ? 1 : 0;
 }
 
 
 #if HAVE_FREERDP_1_1
-static BOOL
+static DWORD
 frdp_changed_certificate_verify (freerdp *instance,
-                                 char    *subject,
-                                 char    *issuer,
-                                 char    *new_fingerprint,
-                                 char    *old_fingerprint)
+                                 const char *common_name,
+                                 const char *subject,
+                                 const char *issuer,
+                                 const char *new_fingerprint,
+                                 const char *old_subject,
+                                 const char *old_issuer,
+                                 const char *old_fingerprint)
 {
   VinagreTab *tab = VINAGRE_TAB (((frdpContext *) instance->context)->rdp_tab);
   GtkBuilder *builder;
@@ -1058,7 +1057,7 @@ frdp_changed_certificate_verify (freerdp
   gtk_widget_hide (dialog);
 
 
-  return response == GTK_RESPONSE_YES;
+  return (response == GTK_RESPONSE_YES) ? 1 : 0;
 }
 #endif