1 |
commit: c7d1e42950960a4cea26c5cd727dc3f40b45d6de |
2 |
Author: Alexander Tsoy <alexander <AT> tsoy <DOT> me> |
3 |
AuthorDate: Sun Jun 20 18:25:43 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jun 21 22:26:05 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7d1e429 |
7 |
|
8 |
net-p2p/amule: Remove old |
9 |
|
10 |
Signed-off-by: Alexander Tsoy <alexander <AT> tsoy.me> |
11 |
Closes: https://github.com/gentoo/gentoo/pull/21348 |
12 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
13 |
|
14 |
net-p2p/amule/Manifest | 1 - |
15 |
net-p2p/amule/amule-2.3.2-r5.ebuild | 155 --------- |
16 |
...le-2.3.2-Fixed-compilation-with-newer-bfd.patch | 33 -- |
17 |
net-p2p/amule/files/amule-2.3.2-cryptopp-6.patch | 25 -- |
18 |
.../amule/files/amule-2.3.2-desktop-mimetype.patch | 30 -- |
19 |
...2.3.2-fix-crash-closing-last-search-tab-1.patch | 97 ------ |
20 |
...2.3.2-fix-crash-closing-last-search-tab-2.patch | 159 ---------- |
21 |
.../amule-2.3.2-fix-crash-shared-dir-utf8.patch | 78 ----- |
22 |
...2.3.2-fix-crash-when-shared-files-changed.patch | 50 --- |
23 |
net-p2p/amule/files/amule-2.3.2-libupnp-1.14.patch | 24 -- |
24 |
net-p2p/amule/files/amule-2.3.2-libupnp-1.6.patch | 350 --------------------- |
25 |
net-p2p/amule/files/amule-2.3.2-libupnp-1.8.patch | 263 ---------------- |
26 |
12 files changed, 1265 deletions(-) |
27 |
|
28 |
diff --git a/net-p2p/amule/Manifest b/net-p2p/amule/Manifest |
29 |
index 83f4b988336..0b9d01e1aa4 100644 |
30 |
--- a/net-p2p/amule/Manifest |
31 |
+++ b/net-p2p/amule/Manifest |
32 |
@@ -1,2 +1 @@ |
33 |
-DIST aMule-2.3.2.tar.xz 3895300 BLAKE2B cf1bce3a0fcd0c108e369b7aed257f067a4ce3ce2fd4e8509b577ac58f8bc52fbc9aabc5c703bc9111dd06ac011ee1f3756279b093b69bcaada106226493237a SHA512 3064b086f8459b4372ea0c11f239a08167c7beac3dde26889f056f617b480b487bea10c2cae8fdfa1ae99c10fc9e715adc8e01e4b968389861aa47c3ec8c0016 |
34 |
DIST aMule-2.3.3.tar.xz 3699376 BLAKE2B 4b1fb98bd52e4c75f81773020d4fc258f8e7c4d7a5d40a7aadabc8fd27b3079705761650fdcd7cd089da77575a74f1950f02039ee14bf4b9894550b8b3d9191b SHA512 a5a80c5ddd1e107d92070c1d8e232c2762c4c54791abc067c739eef7c690062ed164dd7733808f80c762719261162aeb3d602308964dda2670a0bb059d87b74e |
35 |
|
36 |
diff --git a/net-p2p/amule/amule-2.3.2-r5.ebuild b/net-p2p/amule/amule-2.3.2-r5.ebuild |
37 |
deleted file mode 100644 |
38 |
index 30856b93017..00000000000 |
39 |
--- a/net-p2p/amule/amule-2.3.2-r5.ebuild |
40 |
+++ /dev/null |
41 |
@@ -1,155 +0,0 @@ |
42 |
-# Copyright 1999-2020 Gentoo Authors |
43 |
-# Distributed under the terms of the GNU General Public License v2 |
44 |
- |
45 |
-EAPI=7 |
46 |
-WX_GTK_VER="3.0-gtk3" |
47 |
- |
48 |
-inherit wxwidgets xdg-utils |
49 |
- |
50 |
-if [[ ${PV} == 9999 ]] ; then |
51 |
- EGIT_REPO_URI="https://github.com/amule-project/amule" |
52 |
- inherit autotools git-r3 |
53 |
-else |
54 |
- MY_P="${PN/m/M}-${PV}" |
55 |
- SRC_URI="https://download.sourceforge.net/${PN}/${MY_P}.tar.xz" |
56 |
- S="${WORKDIR}/${MY_P}" |
57 |
- KEYWORDS="~alpha amd64 ~arm ppc ppc64 ~sparc x86" |
58 |
-fi |
59 |
- |
60 |
-DESCRIPTION="aMule, the all-platform eMule p2p client" |
61 |
-HOMEPAGE="http://www.amule.org/" |
62 |
- |
63 |
-LICENSE="GPL-2+" |
64 |
-SLOT="0" |
65 |
-IUSE="daemon debug geoip nls remote stats upnp +X" |
66 |
- |
67 |
-RDEPEND=" |
68 |
- dev-libs/boost:= |
69 |
- dev-libs/crypto++:= |
70 |
- sys-libs/binutils-libs:0= |
71 |
- sys-libs/readline:0= |
72 |
- sys-libs/zlib |
73 |
- >=x11-libs/wxGTK-3.0.4:${WX_GTK_VER}[X?] |
74 |
- daemon? ( acct-user/amule ) |
75 |
- geoip? ( dev-libs/geoip ) |
76 |
- nls? ( virtual/libintl ) |
77 |
- remote? ( |
78 |
- acct-user/amule |
79 |
- media-libs/libpng:0= |
80 |
- ) |
81 |
- stats? ( media-libs/gd:=[jpeg,png] ) |
82 |
- upnp? ( net-libs/libupnp:0 ) |
83 |
-" |
84 |
-DEPEND="${RDEPEND} |
85 |
- X? ( dev-util/desktop-file-utils ) |
86 |
-" |
87 |
-BDEPEND=" |
88 |
- virtual/pkgconfig |
89 |
- nls? ( sys-devel/gettext ) |
90 |
-" |
91 |
- |
92 |
-PATCHES=( |
93 |
- "${FILESDIR}/${PN}-2.3.2-fix-crash-shared-dir-utf8.patch" |
94 |
- "${FILESDIR}/${PN}-2.3.2-fix-crash-closing-last-search-tab-1.patch" |
95 |
- "${FILESDIR}/${PN}-2.3.2-fix-crash-closing-last-search-tab-2.patch" |
96 |
- "${FILESDIR}/${PN}-2.3.2-cryptopp-6.patch" |
97 |
- "${FILESDIR}/${PN}-2.3.2-disable-version-check.patch" |
98 |
- "${FILESDIR}/${PN}-2.3.2-fix-crash-when-shared-files-changed.patch" |
99 |
- "${FILESDIR}/${PN}-2.3.2-libupnp-1.8.patch" |
100 |
- "${FILESDIR}/${PN}-2.3.2-libupnp-1.6.patch" |
101 |
- "${FILESDIR}/${PN}-2.3.2-Fixed-compilation-with-newer-bfd.patch" |
102 |
- "${FILESDIR}/${PN}-2.3.2-desktop-mimetype.patch" |
103 |
- "${FILESDIR}/${PN}-2.3.2-libupnp-1.14.patch" |
104 |
-) |
105 |
- |
106 |
-pkg_setup() { |
107 |
- setup-wxwidgets |
108 |
-} |
109 |
- |
110 |
-src_prepare() { |
111 |
- default |
112 |
- |
113 |
- if [[ ${PV} == 9999 ]]; then |
114 |
- ./autogen.sh || die |
115 |
- fi |
116 |
-} |
117 |
- |
118 |
-src_configure() { |
119 |
- local myconf=( |
120 |
- --with-denoise-level=0 |
121 |
- --with-wx-config="${WX_CONFIG}" |
122 |
- --enable-amulecmd |
123 |
- --with-boost |
124 |
- $(use_enable debug) |
125 |
- $(use_enable daemon amule-daemon) |
126 |
- $(use_enable geoip) |
127 |
- $(use_enable nls) |
128 |
- $(use_enable remote webserver) |
129 |
- $(use_enable stats cas) |
130 |
- $(use_enable stats alcc) |
131 |
- $(use_enable upnp) |
132 |
- ) |
133 |
- |
134 |
- if use X; then |
135 |
- myconf+=( |
136 |
- $(use_enable remote amule-gui) |
137 |
- $(use_enable stats alc) |
138 |
- $(use_enable stats wxcas) |
139 |
- ) |
140 |
- else |
141 |
- myconf+=( |
142 |
- --disable-monolithic |
143 |
- --disable-amule-gui |
144 |
- --disable-alc |
145 |
- --disable-wxcas |
146 |
- ) |
147 |
- fi |
148 |
- |
149 |
- econf "${myconf[@]}" |
150 |
-} |
151 |
- |
152 |
-src_install() { |
153 |
- default |
154 |
- |
155 |
- if use daemon; then |
156 |
- newconfd "${FILESDIR}"/amuled.confd-r1 amuled |
157 |
- newinitd "${FILESDIR}"/amuled.initd amuled |
158 |
- fi |
159 |
- if use remote; then |
160 |
- newconfd "${FILESDIR}"/amuleweb.confd-r1 amuleweb |
161 |
- newinitd "${FILESDIR}"/amuleweb.initd amuleweb |
162 |
- fi |
163 |
- |
164 |
- if use daemon || use remote; then |
165 |
- keepdir /var/lib/${PN} |
166 |
- fowners amule:amule /var/lib/${PN} |
167 |
- fperms 0750 /var/lib/${PN} |
168 |
- fi |
169 |
-} |
170 |
- |
171 |
-pkg_postinst() { |
172 |
- local ver |
173 |
- |
174 |
- if use daemon || use remote; then |
175 |
- for ver in ${REPLACING_VERSIONS}; do |
176 |
- if ver_test ${ver} -lt "2.3.2-r4"; then |
177 |
- elog "Default user under which amuled and amuleweb daemons are started" |
178 |
- elog "have been changed from p2p to amule. Default home directory have been" |
179 |
- elog "changed as well." |
180 |
- echo |
181 |
- elog "If you want to preserve old download/share location, you can create" |
182 |
- elog "symlink /var/lib/amule/.aMule pointing to the old location and adjust" |
183 |
- elog "files ownership *or* restore AMULEUSER and AMULEHOME variables in" |
184 |
- elog "/etc/conf.d/{amuled,amuleweb} to the old values." |
185 |
- |
186 |
- break |
187 |
- fi |
188 |
- done |
189 |
- fi |
190 |
- |
191 |
- use X && xdg_desktop_database_update |
192 |
-} |
193 |
- |
194 |
-pkg_postrm() { |
195 |
- use X && xdg_desktop_database_update |
196 |
-} |
197 |
|
198 |
diff --git a/net-p2p/amule/files/amule-2.3.2-Fixed-compilation-with-newer-bfd.patch b/net-p2p/amule/files/amule-2.3.2-Fixed-compilation-with-newer-bfd.patch |
199 |
deleted file mode 100644 |
200 |
index 3ef8a21fa45..00000000000 |
201 |
--- a/net-p2p/amule/files/amule-2.3.2-Fixed-compilation-with-newer-bfd.patch |
202 |
+++ /dev/null |
203 |
@@ -1,33 +0,0 @@ |
204 |
-From c0c28234a40b1b575ce51cdfe5ffa5dac3a7494c Mon Sep 17 00:00:00 2001 |
205 |
-From: Werner Mahr <werner@×××××××××××××××.de> |
206 |
-Date: Fri, 31 Jan 2020 17:55:24 +0100 |
207 |
-Subject: [PATCH] Fixed compilation with newer bfd. Fixes: #174 |
208 |
- |
209 |
---- |
210 |
- src/libs/common/MuleDebug.cpp | 4 ++-- |
211 |
- 1 file changed, 2 insertions(+), 2 deletions(-) |
212 |
- |
213 |
-diff --git a/src/libs/common/MuleDebug.cpp b/src/libs/common/MuleDebug.cpp |
214 |
-index 5d8d75890..0ebf2ab07 100644 |
215 |
---- a/src/libs/common/MuleDebug.cpp |
216 |
-+++ b/src/libs/common/MuleDebug.cpp |
217 |
-@@ -268,14 +268,14 @@ void get_file_line_info(bfd *abfd, asection *section, void* _address) |
218 |
- return; |
219 |
- } |
220 |
- |
221 |
-- bfd_vma vma = bfd_get_section_vma(abfd, section); |
222 |
-+ bfd_vma vma = section->vma; |
223 |
- |
224 |
- unsigned long address = (unsigned long)_address; |
225 |
- if (address < vma) { |
226 |
- return; |
227 |
- } |
228 |
- |
229 |
-- bfd_size_type size = bfd_section_size(abfd, section); |
230 |
-+ bfd_size_type size = section->size; |
231 |
- if (address > (vma + size)) { |
232 |
- return; |
233 |
- } |
234 |
--- |
235 |
-2.24.1 |
236 |
- |
237 |
|
238 |
diff --git a/net-p2p/amule/files/amule-2.3.2-cryptopp-6.patch b/net-p2p/amule/files/amule-2.3.2-cryptopp-6.patch |
239 |
deleted file mode 100644 |
240 |
index d2353447560..00000000000 |
241 |
--- a/net-p2p/amule/files/amule-2.3.2-cryptopp-6.patch |
242 |
+++ /dev/null |
243 |
@@ -1,25 +0,0 @@ |
244 |
-From 27c13f3e622b8a3eaaa05bb62b0149604bdcc9e8 Mon Sep 17 00:00:00 2001 |
245 |
-From: Tommy Jerry Mairo <tommy.mairo@×××××.com> |
246 |
-Date: Wed, 21 Mar 2018 19:56:28 +0100 |
247 |
-Subject: [PATCH] Bugfix: API mismatch with crypto++ 6.0.0 |
248 |
- |
249 |
---- |
250 |
- src/ClientCreditsList.cpp | 2 +- |
251 |
- 1 file changed, 1 insertion(+), 1 deletion(-) |
252 |
- |
253 |
-diff --git a/src/ClientCreditsList.cpp b/src/ClientCreditsList.cpp |
254 |
-index 3bea9fe2d..69e881fd8 100644 |
255 |
---- a/src/ClientCreditsList.cpp |
256 |
-+++ b/src/ClientCreditsList.cpp |
257 |
-@@ -312,7 +312,7 @@ void CClientCreditsList::InitalizeCrypting() |
258 |
- // calculate and store public key |
259 |
- CryptoPP::RSASSA_PKCS1v15_SHA_Verifier pubkey(*static_cast<CryptoPP::RSASSA_PKCS1v15_SHA_Signer *>(m_pSignkey)); |
260 |
- CryptoPP::ArraySink asink(m_abyMyPublicKey, 80); |
261 |
-- pubkey.DEREncode(asink); |
262 |
-+ pubkey.GetMaterial().Save(asink); |
263 |
- m_nMyPublicKeyLen = asink.TotalPutLength(); |
264 |
- asink.MessageEnd(); |
265 |
- } catch (const CryptoPP::Exception& e) { |
266 |
--- |
267 |
-2.16.4 |
268 |
- |
269 |
|
270 |
diff --git a/net-p2p/amule/files/amule-2.3.2-desktop-mimetype.patch b/net-p2p/amule/files/amule-2.3.2-desktop-mimetype.patch |
271 |
deleted file mode 100644 |
272 |
index cd8ba4c2fc5..00000000000 |
273 |
--- a/net-p2p/amule/files/amule-2.3.2-desktop-mimetype.patch |
274 |
+++ /dev/null |
275 |
@@ -1,30 +0,0 @@ |
276 |
-From 048e86d44e09ef9dc1897c432660a712109b263a Mon Sep 17 00:00:00 2001 |
277 |
-From: Werner Mahr <werner@×××××××××××××××.de> |
278 |
-Date: Mon, 29 Apr 2019 18:37:35 +0200 |
279 |
-Subject: [PATCH] Added imetype-handler for amule ed2k-links. Patch taken from |
280 |
- debian. |
281 |
- |
282 |
---- |
283 |
- amule.desktop | 3 ++- |
284 |
- 1 file changed, 2 insertions(+), 1 deletion(-) |
285 |
- |
286 |
-diff --git a/amule.desktop b/amule.desktop |
287 |
-index 70be367af..1cfb38010 100644 |
288 |
---- a/amule.desktop |
289 |
-+++ b/amule.desktop |
290 |
-@@ -1,6 +1,6 @@ |
291 |
- [Desktop Entry] |
292 |
- Name=aMule |
293 |
--Exec=amule |
294 |
-+Exec=amule %u |
295 |
- Icon=amule |
296 |
- Terminal=false |
297 |
- Type=Application |
298 |
-@@ -8,3 +8,4 @@ Categories=Network;P2P; |
299 |
- Comment=A client for the eD2k network |
300 |
- Comment[fr]=Un client pour le réseau eD2k |
301 |
- Comment[tr]=eD2k ağı için istemci |
302 |
-+MimeType=x-scheme-handler/ed2k; |
303 |
--- |
304 |
-2.26.2 |
305 |
- |
306 |
|
307 |
diff --git a/net-p2p/amule/files/amule-2.3.2-fix-crash-closing-last-search-tab-1.patch b/net-p2p/amule/files/amule-2.3.2-fix-crash-closing-last-search-tab-1.patch |
308 |
deleted file mode 100644 |
309 |
index c480165eb98..00000000000 |
310 |
--- a/net-p2p/amule/files/amule-2.3.2-fix-crash-closing-last-search-tab-1.patch |
311 |
+++ /dev/null |
312 |
@@ -1,97 +0,0 @@ |
313 |
-From 0f0c5c220228aea81142c7c00f73414cdb1b507a Mon Sep 17 00:00:00 2001 |
314 |
-From: gaffa <gaffa@×××××××××××.dk> |
315 |
-Date: Wed, 12 Oct 2016 19:36:21 +0200 |
316 |
-Subject: [PATCH] A workaround for inconsistent behaviour in wxWidgets, where |
317 |
- the button release signal is falling through. Instead of calling DeletePage |
318 |
- directly an event is added to delete the page after the button release event |
319 |
- has been processed by all handlers. |
320 |
- |
321 |
---- |
322 |
- src/MuleNotebook.cpp | 17 ++++++++++++++++- |
323 |
- src/MuleNotebook.h | 13 +++++++++++++ |
324 |
- 2 files changed, 29 insertions(+), 1 deletion(-) |
325 |
- |
326 |
-diff --git a/src/MuleNotebook.cpp b/src/MuleNotebook.cpp |
327 |
-index ff3ba294e..4ab23ce18 100644 |
328 |
---- a/src/MuleNotebook.cpp |
329 |
-+++ b/src/MuleNotebook.cpp |
330 |
-@@ -32,6 +32,7 @@ |
331 |
- |
332 |
- DEFINE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MULENOTEBOOK_PAGE_CLOSING) |
333 |
- DEFINE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MULENOTEBOOK_ALL_PAGES_CLOSED) |
334 |
-+DEFINE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MULENOTEBOOK_DELETE_PAGE) |
335 |
- |
336 |
- BEGIN_EVENT_TABLE(CMuleNotebook, wxNotebook) |
337 |
- EVT_RIGHT_DOWN(CMuleNotebook::OnRMButton) |
338 |
-@@ -44,6 +45,7 @@ BEGIN_EVENT_TABLE(CMuleNotebook, wxNotebook) |
339 |
- EVT_LEFT_UP(CMuleNotebook::OnMouseButtonRelease) |
340 |
- EVT_MIDDLE_UP(CMuleNotebook::OnMouseButtonRelease) |
341 |
- EVT_MOTION(CMuleNotebook::OnMouseMotion) |
342 |
-+ EVT_MULENOTEBOOK_DELETE_PAGE(wxID_ANY, CMuleNotebook::OnDeletePage) |
343 |
- END_EVENT_TABLE() |
344 |
- |
345 |
- CMuleNotebook::CMuleNotebook( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) |
346 |
-@@ -60,6 +62,12 @@ CMuleNotebook::~CMuleNotebook() |
347 |
- DeleteAllPages(); |
348 |
- } |
349 |
- |
350 |
-+void CMuleNotebook::OnDeletePage(wxBookCtrlEvent& evt) |
351 |
-+{ |
352 |
-+ int page = evt.GetSelection(); |
353 |
-+ DeletePage(page); |
354 |
-+} |
355 |
-+ |
356 |
- |
357 |
- bool CMuleNotebook::DeletePage(int nPage) |
358 |
- { |
359 |
-@@ -216,7 +224,14 @@ void CMuleNotebook::OnMouseButtonRelease(wxMouseEvent &event) |
360 |
- if ((tab != -1) && (((flags == wxNB_HITTEST_ONICON) && event.LeftUp()) || |
361 |
- ((flags == wxNB_HITTEST_ONLABEL) && event.MiddleUp()))) { |
362 |
- // User did click on a 'x' or middle click on the label |
363 |
-- DeletePage(tab); |
364 |
-+ |
365 |
-+ /* WORKAROUND: Instead of calling DeletePage, we need to wait for the |
366 |
-+ * mouse release signal to reach Gtk. Inconsistent with normal wxEvent |
367 |
-+ * behaviour the button release handler in wxWidgets don't evaluate |
368 |
-+ * the result of the signal handling. */ |
369 |
-+ wxNotebookEvent evt( wxEVT_COMMAND_MULENOTEBOOK_DELETE_PAGE, GetId(), tab ); |
370 |
-+ evt.SetEventObject(this); |
371 |
-+ AddPendingEvent( evt ); |
372 |
- } else { |
373 |
- // Is not a 'x'. Send this event up. |
374 |
- event.Skip(); |
375 |
-diff --git a/src/MuleNotebook.h b/src/MuleNotebook.h |
376 |
-index dda097d07..ab2809d88 100644 |
377 |
---- a/src/MuleNotebook.h |
378 |
-+++ b/src/MuleNotebook.h |
379 |
-@@ -31,7 +31,16 @@ |
380 |
- |
381 |
- DECLARE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MULENOTEBOOK_PAGE_CLOSING, -1) |
382 |
- DECLARE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MULENOTEBOOK_ALL_PAGES_CLOSED, -1) |
383 |
-+DECLARE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MULENOTEBOOK_DELETE_PAGE, -1) |
384 |
- |
385 |
-+#define EVT_MULENOTEBOOK_DELETE_PAGE(id, fn) \ |
386 |
-+ DECLARE_EVENT_TABLE_ENTRY( \ |
387 |
-+ wxEVT_COMMAND_MULENOTEBOOK_DELETE_PAGE, \ |
388 |
-+ id, \ |
389 |
-+ -1, \ |
390 |
-+ (wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \ |
391 |
-+ NULL \ |
392 |
-+ ), |
393 |
- #define EVT_MULENOTEBOOK_PAGE_CLOSING(id, fn) \ |
394 |
- DECLARE_EVENT_TABLE_ENTRY( \ |
395 |
- wxEVT_COMMAND_MULENOTEBOOK_PAGE_CLOSING, \ |
396 |
-@@ -107,6 +116,10 @@ public: |
397 |
- */ |
398 |
- void SetPopupHandler( wxWindow* widget ); |
399 |
- |
400 |
-+private: |
401 |
-+ // Internal handler. Workaround for wxWidgets Tab-Crash bug. |
402 |
-+ void OnDeletePage(wxBookCtrlEvent& evt); |
403 |
-+ |
404 |
- protected: |
405 |
- /** |
406 |
- * Event handler for left or middle mouse button release (for closing pages) |
407 |
--- |
408 |
-2.16.4 |
409 |
- |
410 |
|
411 |
diff --git a/net-p2p/amule/files/amule-2.3.2-fix-crash-closing-last-search-tab-2.patch b/net-p2p/amule/files/amule-2.3.2-fix-crash-closing-last-search-tab-2.patch |
412 |
deleted file mode 100644 |
413 |
index e47970beb0c..00000000000 |
414 |
--- a/net-p2p/amule/files/amule-2.3.2-fix-crash-closing-last-search-tab-2.patch |
415 |
+++ /dev/null |
416 |
@@ -1,159 +0,0 @@ |
417 |
-From 4c94c2d9f3be8b9068966f15aebc29b8c9b706ab Mon Sep 17 00:00:00 2001 |
418 |
-From: =?UTF-8?q?D=C3=A9vai=20Tam=C3=A1s?= <gonosztopi@×××××.org> |
419 |
-Date: Mon, 17 Oct 2016 22:14:26 +0200 |
420 |
-Subject: [PATCH] Apply the workaround only if needed |
421 |
- |
422 |
-This way it'll be easy for us to remove the workaround once wxWidgets fixes |
423 |
-the bug. |
424 |
---- |
425 |
- docs/Changelog | 4 ++++ |
426 |
- src/MuleNotebook.cpp | 19 ++++++++++++++----- |
427 |
- src/MuleNotebook.h | 8 ++++++++ |
428 |
- 3 files changed, 26 insertions(+), 5 deletions(-) |
429 |
- |
430 |
-diff --git a/docs/Changelog b/docs/Changelog |
431 |
-index 7dbff70b2..e9176dd51 100644 |
432 |
---- a/docs/Changelog |
433 |
-+++ b/docs/Changelog |
434 |
-@@ -2,6 +2,10 @@ Version 2.4.0 - The river knows. |
435 |
- ---------- |
436 |
- 201?-??-?? |
437 |
- |
438 |
-+ gaffatape: |
439 |
-+ * Workaround for bug in wxWidgets causing aMule to crash on |
440 |
-+ closing the last search tab |
441 |
-+ |
442 |
- GonoszTopi: |
443 |
- * Fix restoring toolbar orientation on 'Cancel' |
444 |
- |
445 |
-diff --git a/src/MuleNotebook.cpp b/src/MuleNotebook.cpp |
446 |
-index 4ab23ce18..5d3ad0453 100644 |
447 |
---- a/src/MuleNotebook.cpp |
448 |
-+++ b/src/MuleNotebook.cpp |
449 |
-@@ -32,7 +32,10 @@ |
450 |
- |
451 |
- DEFINE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MULENOTEBOOK_PAGE_CLOSING) |
452 |
- DEFINE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MULENOTEBOOK_ALL_PAGES_CLOSED) |
453 |
-+ |
454 |
-+#if MULE_NEEDS_DELETEPAGE_WORKAROUND |
455 |
- DEFINE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MULENOTEBOOK_DELETE_PAGE) |
456 |
-+#endif |
457 |
- |
458 |
- BEGIN_EVENT_TABLE(CMuleNotebook, wxNotebook) |
459 |
- EVT_RIGHT_DOWN(CMuleNotebook::OnRMButton) |
460 |
-@@ -45,9 +48,12 @@ BEGIN_EVENT_TABLE(CMuleNotebook, wxNotebook) |
461 |
- EVT_LEFT_UP(CMuleNotebook::OnMouseButtonRelease) |
462 |
- EVT_MIDDLE_UP(CMuleNotebook::OnMouseButtonRelease) |
463 |
- EVT_MOTION(CMuleNotebook::OnMouseMotion) |
464 |
-+#if MULE_NEEDS_DELETEPAGE_WORKAROUND |
465 |
- EVT_MULENOTEBOOK_DELETE_PAGE(wxID_ANY, CMuleNotebook::OnDeletePage) |
466 |
-+#endif |
467 |
- END_EVENT_TABLE() |
468 |
- |
469 |
-+ |
470 |
- CMuleNotebook::CMuleNotebook( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) |
471 |
- : wxNotebook(parent, id, pos, size, style, name) |
472 |
- { |
473 |
-@@ -62,11 +68,14 @@ CMuleNotebook::~CMuleNotebook() |
474 |
- DeleteAllPages(); |
475 |
- } |
476 |
- |
477 |
-+ |
478 |
-+#if MULE_NEEDS_DELETEPAGE_WORKAROUND |
479 |
- void CMuleNotebook::OnDeletePage(wxBookCtrlEvent& evt) |
480 |
- { |
481 |
- int page = evt.GetSelection(); |
482 |
- DeletePage(page); |
483 |
- } |
484 |
-+#endif // MULE_NEEDS_DELETEPAGE_WORKAROUND |
485 |
- |
486 |
- |
487 |
- bool CMuleNotebook::DeletePage(int nPage) |
488 |
-@@ -208,7 +217,6 @@ void CMuleNotebook::OnPopupCloseOthers(wxCommandEvent& WXUNUSED(evt)) |
489 |
- |
490 |
- void CMuleNotebook::OnMouseButtonRelease(wxMouseEvent &event) |
491 |
- { |
492 |
-- |
493 |
- if (GetImageList() == NULL) { |
494 |
- // This Mulenotebook has no images on tabs, so nothing to do. |
495 |
- event.Skip(); |
496 |
-@@ -224,7 +232,7 @@ void CMuleNotebook::OnMouseButtonRelease(wxMouseEvent &event) |
497 |
- if ((tab != -1) && (((flags == wxNB_HITTEST_ONICON) && event.LeftUp()) || |
498 |
- ((flags == wxNB_HITTEST_ONLABEL) && event.MiddleUp()))) { |
499 |
- // User did click on a 'x' or middle click on the label |
500 |
-- |
501 |
-+#if MULE_NEEDS_DELETEPAGE_WORKAROUND |
502 |
- /* WORKAROUND: Instead of calling DeletePage, we need to wait for the |
503 |
- * mouse release signal to reach Gtk. Inconsistent with normal wxEvent |
504 |
- * behaviour the button release handler in wxWidgets don't evaluate |
505 |
-@@ -232,16 +240,18 @@ void CMuleNotebook::OnMouseButtonRelease(wxMouseEvent &event) |
506 |
- wxNotebookEvent evt( wxEVT_COMMAND_MULENOTEBOOK_DELETE_PAGE, GetId(), tab ); |
507 |
- evt.SetEventObject(this); |
508 |
- AddPendingEvent( evt ); |
509 |
-+#else |
510 |
-+ DeletePage(tab); |
511 |
-+#endif // MULE_NEEDS_DELETEPAGE_WORKAROUND |
512 |
- } else { |
513 |
- // Is not a 'x'. Send this event up. |
514 |
- event.Skip(); |
515 |
- } |
516 |
-- |
517 |
- } |
518 |
- |
519 |
-+ |
520 |
- void CMuleNotebook::OnMouseMotion(wxMouseEvent &event) |
521 |
- { |
522 |
-- |
523 |
- if (GetImageList() == NULL) { |
524 |
- // This Mulenotebook has no images on tabs, so nothing to do. |
525 |
- event.Skip(); |
526 |
-@@ -263,7 +273,6 @@ void CMuleNotebook::OnMouseMotion(wxMouseEvent &event) |
527 |
- // Is not a 'x'. Send this event up. |
528 |
- event.Skip(); |
529 |
- } |
530 |
-- |
531 |
- } |
532 |
- |
533 |
- // File_checked_for_headers |
534 |
-diff --git a/src/MuleNotebook.h b/src/MuleNotebook.h |
535 |
-index ab2809d88..14f61ee68 100644 |
536 |
---- a/src/MuleNotebook.h |
537 |
-+++ b/src/MuleNotebook.h |
538 |
-@@ -28,9 +28,13 @@ |
539 |
- |
540 |
- #include <wx/notebook.h> |
541 |
- |
542 |
-+#define MULE_NEEDS_DELETEPAGE_WORKAROUND wxCHECK_VERSION(3,0,2) |
543 |
-+ |
544 |
- |
545 |
- DECLARE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MULENOTEBOOK_PAGE_CLOSING, -1) |
546 |
- DECLARE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MULENOTEBOOK_ALL_PAGES_CLOSED, -1) |
547 |
-+ |
548 |
-+#if MULE_NEEDS_DELETEPAGE_WORKAROUND |
549 |
- DECLARE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MULENOTEBOOK_DELETE_PAGE, -1) |
550 |
- |
551 |
- #define EVT_MULENOTEBOOK_DELETE_PAGE(id, fn) \ |
552 |
-@@ -41,6 +45,8 @@ DECLARE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MULENOTEBOOK_DELETE_PAGE, -1) |
553 |
- (wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \ |
554 |
- NULL \ |
555 |
- ), |
556 |
-+#endif // MULE_NEEDS_DELETEPAGE_WORKAROUND |
557 |
-+ |
558 |
- #define EVT_MULENOTEBOOK_PAGE_CLOSING(id, fn) \ |
559 |
- DECLARE_EVENT_TABLE_ENTRY( \ |
560 |
- wxEVT_COMMAND_MULENOTEBOOK_PAGE_CLOSING, \ |
561 |
-@@ -116,9 +122,11 @@ public: |
562 |
- */ |
563 |
- void SetPopupHandler( wxWindow* widget ); |
564 |
- |
565 |
-+#if MULE_NEEDS_DELETEPAGE_WORKAROUND |
566 |
- private: |
567 |
- // Internal handler. Workaround for wxWidgets Tab-Crash bug. |
568 |
- void OnDeletePage(wxBookCtrlEvent& evt); |
569 |
-+#endif // MULE_NEEDS_DELETEPAGE_WORKAROUND |
570 |
- |
571 |
- protected: |
572 |
- /** |
573 |
--- |
574 |
-2.16.4 |
575 |
- |
576 |
|
577 |
diff --git a/net-p2p/amule/files/amule-2.3.2-fix-crash-shared-dir-utf8.patch b/net-p2p/amule/files/amule-2.3.2-fix-crash-shared-dir-utf8.patch |
578 |
deleted file mode 100644 |
579 |
index aa92ff6c81e..00000000000 |
580 |
--- a/net-p2p/amule/files/amule-2.3.2-fix-crash-shared-dir-utf8.patch |
581 |
+++ /dev/null |
582 |
@@ -1,78 +0,0 @@ |
583 |
-From 17816ed02f59bab9c27310e7f24c73266b0a3003 Mon Sep 17 00:00:00 2001 |
584 |
-From: persmule <persmule@×××××.com> |
585 |
-Date: Wed, 5 Oct 2016 13:47:46 +0800 |
586 |
-Subject: [PATCH] Add a routine to set file name conversion for amuled which |
587 |
- based on wxAppConsole |
588 |
- |
589 |
---- |
590 |
- src/amule.h | 7 +++++++ |
591 |
- src/amuled.cpp | 35 +++++++++++++++++++++++++++++++++++ |
592 |
- 2 files changed, 42 insertions(+) |
593 |
- |
594 |
-diff --git a/src/amule.h b/src/amule.h |
595 |
-index f25702f60..240c02dd9 100644 |
596 |
---- a/src/amule.h |
597 |
-+++ b/src/amule.h |
598 |
-@@ -553,6 +553,13 @@ private: |
599 |
- int OnExit(); |
600 |
- |
601 |
- virtual int InitGui(bool geometry_enable, wxString &geometry_string); |
602 |
-+ // The GTK wxApps sets its file name conversion properly |
603 |
-+ // in wxApp::Initialize(), while wxAppConsole::Initialize() |
604 |
-+ // does not, leaving wxConvFile being set to wxConvLibc. File |
605 |
-+ // name conversion should be set otherwise amuled will abort to |
606 |
-+ // handle non-ASCII file names which monolithic amule can handle. |
607 |
-+ // This function are overrided to perform this. |
608 |
-+ virtual bool Initialize(int& argc_, wxChar **argv_); |
609 |
- |
610 |
- #ifdef AMULED_APPTRAITS |
611 |
- struct sigaction m_oldSignalChildAction; |
612 |
-diff --git a/src/amuled.cpp b/src/amuled.cpp |
613 |
-index 486da5973..86e1ff8b8 100644 |
614 |
---- a/src/amuled.cpp |
615 |
-+++ b/src/amuled.cpp |
616 |
-@@ -704,6 +704,41 @@ int CamuleDaemonApp::InitGui(bool ,wxString &) |
617 |
- return 0; |
618 |
- } |
619 |
- |
620 |
-+bool CamuleDaemonApp::Initialize(int& argc_, wxChar **argv_) |
621 |
-+{ |
622 |
-+ if ( !wxAppConsole::Initialize(argc_, argv_) ) { |
623 |
-+ return false; |
624 |
-+ } |
625 |
-+ |
626 |
-+#ifdef __UNIX__ |
627 |
-+ wxString encName; |
628 |
-+#if wxUSE_INTL |
629 |
-+ // if a non default locale is set, |
630 |
-+ // assume that the user wants his |
631 |
-+ // filenames in this locale too |
632 |
-+ encName = wxLocale::GetSystemEncodingName().Upper(); |
633 |
-+ |
634 |
-+ // But don't consider ASCII in this case. |
635 |
-+ if ( !encName.empty() ) { |
636 |
-+ if ( encName == wxT("US-ASCII") ) { |
637 |
-+ // This means US-ASCII when returned |
638 |
-+ // from GetEncodingFromName(). |
639 |
-+ encName.clear(); |
640 |
-+ } |
641 |
-+ } |
642 |
-+#endif // wxUSE_INTL |
643 |
-+ |
644 |
-+ // in this case, UTF-8 is used by default. |
645 |
-+ if ( encName.empty() ) { |
646 |
-+ encName = wxT("UTF-8"); |
647 |
-+ } |
648 |
-+ |
649 |
-+ static wxConvBrokenFileNames fileconv(encName); |
650 |
-+ wxConvFileName = &fileconv; |
651 |
-+#endif // __UNIX__ |
652 |
-+ |
653 |
-+ return true; |
654 |
-+} |
655 |
- |
656 |
- int CamuleDaemonApp::OnExit() |
657 |
- { |
658 |
--- |
659 |
-2.16.4 |
660 |
- |
661 |
|
662 |
diff --git a/net-p2p/amule/files/amule-2.3.2-fix-crash-when-shared-files-changed.patch b/net-p2p/amule/files/amule-2.3.2-fix-crash-when-shared-files-changed.patch |
663 |
deleted file mode 100644 |
664 |
index 81e0ef7b629..00000000000 |
665 |
--- a/net-p2p/amule/files/amule-2.3.2-fix-crash-when-shared-files-changed.patch |
666 |
+++ /dev/null |
667 |
@@ -1,50 +0,0 @@ |
668 |
-From 110a056fa4bcfc0fe8c1f8eadcc2bd5df0bbf5e1 Mon Sep 17 00:00:00 2001 |
669 |
-From: xinhuang <xinhuang.abc@×××××.com> |
670 |
-Date: Thu, 4 Jan 2018 00:44:35 -0800 |
671 |
-Subject: [PATCH] fix crash when shared files changed on Shared files tab |
672 |
- |
673 |
---- |
674 |
- src/extern/wxWidgets/listctrl.cpp | 10 ---------- |
675 |
- src/extern/wxWidgets/listctrl.h | 5 ----- |
676 |
- 2 files changed, 15 deletions(-) |
677 |
- |
678 |
-diff --git a/src/extern/wxWidgets/listctrl.cpp b/src/extern/wxWidgets/listctrl.cpp |
679 |
-index 18a30f205..460700691 100644 |
680 |
---- a/src/extern/wxWidgets/listctrl.cpp |
681 |
-+++ b/src/extern/wxWidgets/listctrl.cpp |
682 |
-@@ -5803,16 +5803,6 @@ bool wxGenericListCtrl::DoPopupMenu( wxMenu *menu, int x, int y ) |
683 |
- #endif |
684 |
- } |
685 |
- |
686 |
--void wxGenericListCtrl::DoClientToScreen( int *x, int *y ) const |
687 |
--{ |
688 |
-- m_mainWin->DoClientToScreen(x, y); |
689 |
--} |
690 |
-- |
691 |
--void wxGenericListCtrl::DoScreenToClient( int *x, int *y ) const |
692 |
--{ |
693 |
-- m_mainWin->DoScreenToClient(x, y); |
694 |
--} |
695 |
-- |
696 |
- void wxGenericListCtrl::SetFocus() |
697 |
- { |
698 |
- // The test in window.cpp fails as we are a composite |
699 |
-diff --git a/src/extern/wxWidgets/listctrl.h b/src/extern/wxWidgets/listctrl.h |
700 |
-index b18a61866..e72f7eaf0 100644 |
701 |
---- a/src/extern/wxWidgets/listctrl.h |
702 |
-+++ b/src/extern/wxWidgets/listctrl.h |
703 |
-@@ -232,11 +232,6 @@ public: |
704 |
- protected: |
705 |
- virtual bool DoPopupMenu( wxMenu *menu, int x, int y ); |
706 |
- |
707 |
-- // take into account the coordinates difference between the container |
708 |
-- // window and the list control window itself here |
709 |
-- virtual void DoClientToScreen( int *x, int *y ) const; |
710 |
-- virtual void DoScreenToClient( int *x, int *y ) const; |
711 |
-- |
712 |
- virtual wxSize DoGetBestSize() const; |
713 |
- |
714 |
- // return the text for the given column of the given item |
715 |
--- |
716 |
-2.21.0 |
717 |
- |
718 |
|
719 |
diff --git a/net-p2p/amule/files/amule-2.3.2-libupnp-1.14.patch b/net-p2p/amule/files/amule-2.3.2-libupnp-1.14.patch |
720 |
deleted file mode 100644 |
721 |
index d68e4776e0a..00000000000 |
722 |
--- a/net-p2p/amule/files/amule-2.3.2-libupnp-1.14.patch |
723 |
+++ /dev/null |
724 |
@@ -1,24 +0,0 @@ |
725 |
---- a/src/UPnPBase.cpp 2016-09-16 09:55:07.000000000 +0200 |
726 |
-+++ b/src/UPnPBase.cpp 2020-09-03 12:37:43.861231093 +0200 |
727 |
-@@ -824,13 +824,17 @@ m_WanService(NULL) |
728 |
- // Null string at first |
729 |
- std::ostringstream msg; |
730 |
- |
731 |
-+ // Declare those here to avoid |
732 |
-+ // "jump to label ‘error’ [-fpermissive] crosses initialization |
733 |
-+ // of ‘char* ipAddress’" |
734 |
-+ unsigned short port; |
735 |
-+ char *ipAddress; |
736 |
-+ |
737 |
- // Start UPnP |
738 |
- int ret; |
739 |
-- char *ipAddress = NULL; |
740 |
-- unsigned short port = 0; |
741 |
-- ret = UpnpInit(ipAddress, udpPort); |
742 |
-+ ret = UpnpInit2(0, udpPort); |
743 |
- if (ret != UPNP_E_SUCCESS) { |
744 |
-- msg << "error(UpnpInit): Error code "; |
745 |
-+ msg << "error(UpnpInit2): Error code "; |
746 |
- goto error; |
747 |
- } |
748 |
- port = UpnpGetServerPort(); |
749 |
|
750 |
diff --git a/net-p2p/amule/files/amule-2.3.2-libupnp-1.6.patch b/net-p2p/amule/files/amule-2.3.2-libupnp-1.6.patch |
751 |
deleted file mode 100644 |
752 |
index 0fd0edfbd8f..00000000000 |
753 |
--- a/net-p2p/amule/files/amule-2.3.2-libupnp-1.6.patch |
754 |
+++ /dev/null |
755 |
@@ -1,350 +0,0 @@ |
756 |
-From cb30875bd4e45736ff4ee1137ff97316295ff7be Mon Sep 17 00:00:00 2001 |
757 |
-From: Pablo Barciela <scow@××××××.net> |
758 |
-Date: Sat, 24 Nov 2018 01:23:58 +0100 |
759 |
-Subject: [PATCH] Fix build with libupnp 1.6 |
760 |
- |
761 |
---- |
762 |
- src/UPnPBase.cpp | 138 ++++++++++++++++++++++++++++++++++++++++++++++- |
763 |
- src/UPnPBase.h | 6 +++ |
764 |
- 2 files changed, 142 insertions(+), 2 deletions(-) |
765 |
- |
766 |
-diff --git a/src/UPnPBase.cpp b/src/UPnPBase.cpp |
767 |
-index d4063a136..774ebfc32 100644 |
768 |
---- a/src/UPnPBase.cpp |
769 |
-+++ b/src/UPnPBase.cpp |
770 |
-@@ -1127,7 +1127,11 @@ bool CUPnPControlPoint::PrivateDeletePortMapping( |
771 |
- |
772 |
- |
773 |
- // This function is static |
774 |
-+#if UPNP_VERSION >= 10800 |
775 |
- int CUPnPControlPoint::Callback(Upnp_EventType_e EventType, const void *Event, void * /*Cookie*/) |
776 |
-+#else |
777 |
-+int CUPnPControlPoint::Callback(Upnp_EventType EventType, void *Event, void * /*Cookie*/) |
778 |
-+#endif |
779 |
- { |
780 |
- std::ostringstream msg; |
781 |
- std::ostringstream msg2; |
782 |
-@@ -1149,25 +1153,47 @@ int CUPnPControlPoint::Callback(Upnp_EventType_e EventType, const void *Event, v |
783 |
- msg2<< "UPNP_DISCOVERY_SEARCH_RESULT: "; |
784 |
- // UPnP Discovery |
785 |
- upnpDiscovery: |
786 |
-+#if UPNP_VERSION >= 10800 |
787 |
- UpnpDiscovery *d_event = (UpnpDiscovery *)Event; |
788 |
-+#else |
789 |
-+ struct Upnp_Discovery *d_event = (struct Upnp_Discovery *)Event; |
790 |
-+#endif |
791 |
- IXML_Document *doc = NULL; |
792 |
-+#if UPNP_VERSION >= 10800 |
793 |
- int errCode = UpnpDiscovery_get_ErrCode(d_event); |
794 |
- if (errCode != UPNP_E_SUCCESS) { |
795 |
- msg << UpnpGetErrorMessage(errCode) << "."; |
796 |
-+#else |
797 |
-+ int ret; |
798 |
-+ if (d_event->ErrCode != UPNP_E_SUCCESS) { |
799 |
-+ msg << UpnpGetErrorMessage(d_event->ErrCode) << "."; |
800 |
-+#endif |
801 |
- AddDebugLogLineC(logUPnP, msg); |
802 |
- } |
803 |
- // Get the XML tree device description in doc |
804 |
-+#if UPNP_VERSION >= 10800 |
805 |
- const char *location = UpnpDiscovery_get_Location_cstr(d_event); |
806 |
- int ret = UpnpDownloadXmlDoc(location, &doc); |
807 |
-+#else |
808 |
-+ ret = UpnpDownloadXmlDoc(d_event->Location, &doc); |
809 |
-+#endif |
810 |
- if (ret != UPNP_E_SUCCESS) { |
811 |
- msg << "Error retrieving device description from " << |
812 |
-+#if UPNP_VERSION >= 10800 |
813 |
- location << ": " << |
814 |
-+#else |
815 |
-+ d_event->Location << ": " << |
816 |
-+#endif |
817 |
- UpnpGetErrorMessage(ret) << |
818 |
- "(" << ret << ")."; |
819 |
- AddDebugLogLineC(logUPnP, msg); |
820 |
- } else { |
821 |
- msg2 << "Retrieving device description from " << |
822 |
-+#if UPNP_VERSION >= 10800 |
823 |
- location << "."; |
824 |
-+#else |
825 |
-+ d_event->Location << "."; |
826 |
-+#endif |
827 |
- AddDebugLogLineN(logUPnP, msg2); |
828 |
- } |
829 |
- if (doc) { |
830 |
-@@ -1195,9 +1221,14 @@ upnpDiscovery: |
831 |
- AddDebugLogLineC(logUPnP, msg); |
832 |
- } |
833 |
- // Add the root device to our list |
834 |
-+#if UPNP_VERSION >= 10800 |
835 |
- int expires = UpnpDiscovery_get_Expires(d_event); |
836 |
- upnpCP->AddRootDevice(rootDevice, urlBase, |
837 |
- location, expires); |
838 |
-+#else |
839 |
-+ upnpCP->AddRootDevice(rootDevice, urlBase, |
840 |
-+ d_event->Location, d_event->Expires); |
841 |
-+#endif |
842 |
- } |
843 |
- // Free the XML doc tree |
844 |
- IXML::Document::Free(doc); |
845 |
-@@ -1218,35 +1249,62 @@ upnpDiscovery: |
846 |
- case UPNP_DISCOVERY_ADVERTISEMENT_BYEBYE: { |
847 |
- //fprintf(stderr, "Callback: UPNP_DISCOVERY_ADVERTISEMENT_BYEBYE\n"); |
848 |
- // UPnP Device Removed |
849 |
-+#if UPNP_VERSION >= 10800 |
850 |
- UpnpDiscovery *dab_event = (UpnpDiscovery *)Event; |
851 |
- int errCode = UpnpDiscovery_get_ErrCode(dab_event); |
852 |
- if (errCode != UPNP_E_SUCCESS) { |
853 |
-+#else |
854 |
-+ struct Upnp_Discovery *dab_event = (struct Upnp_Discovery *)Event; |
855 |
-+ if (dab_event->ErrCode != UPNP_E_SUCCESS) { |
856 |
-+#endif |
857 |
- msg << "error(UPNP_DISCOVERY_ADVERTISEMENT_BYEBYE): " << |
858 |
-+#if UPNP_VERSION >= 10800 |
859 |
- UpnpGetErrorMessage(errCode) << |
860 |
-+#else |
861 |
-+ UpnpGetErrorMessage(dab_event->ErrCode) << |
862 |
-+#endif |
863 |
- "."; |
864 |
- AddDebugLogLineC(logUPnP, msg); |
865 |
- } |
866 |
-+#if UPNP_VERSION >= 10800 |
867 |
- std::string devType = UpnpDiscovery_get_DeviceType_cstr(dab_event); |
868 |
-+#else |
869 |
-+ std::string devType = dab_event->DeviceType; |
870 |
-+#endif |
871 |
- // Check for an InternetGatewayDevice and removes it from the list |
872 |
-- std::transform(devType.begin(), devType.end(), |
873 |
-- devType.begin(), tolower); |
874 |
-+ |
875 |
-+ std::transform(devType.begin(), devType.end(), devType.begin(), tolower); |
876 |
-+ |
877 |
- if (stdStringIsEqualCI(devType, UPnP::Device::IGW)) { |
878 |
-+#if UPNP_VERSION >= 10800 |
879 |
- const char *deviceID = |
880 |
- UpnpDiscovery_get_DeviceID_cstr(dab_event); |
881 |
- upnpCP->RemoveRootDevice(deviceID); |
882 |
-+#else |
883 |
-+ upnpCP->RemoveRootDevice(dab_event->DeviceId); |
884 |
-+#endif |
885 |
- } |
886 |
- break; |
887 |
- } |
888 |
- case UPNP_EVENT_RECEIVED: { |
889 |
- //fprintf(stderr, "Callback: UPNP_EVENT_RECEIVED\n"); |
890 |
- // Event reveived |
891 |
-+#if UPNP_VERSION >= 10800 |
892 |
- UpnpEvent *e_event = (UpnpEvent *)Event; |
893 |
- int eventKey = UpnpEvent_get_EventKey(e_event); |
894 |
- IXML_Document *changedVariables = |
895 |
- UpnpEvent_get_ChangedVariables(e_event); |
896 |
- const std::string sid = UpnpEvent_get_SID_cstr(e_event); |
897 |
-+#else |
898 |
-+ struct Upnp_Event *e_event = (struct Upnp_Event *)Event; |
899 |
-+ const std::string Sid = e_event->Sid; |
900 |
-+#endif |
901 |
- // Parses the event |
902 |
-+#if UPNP_VERSION >= 10800 |
903 |
- upnpCP->OnEventReceived(sid, eventKey, changedVariables); |
904 |
-+#else |
905 |
-+ upnpCP->OnEventReceived(Sid, e_event->EventKey, e_event->ChangedVariables); |
906 |
-+#endif |
907 |
- break; |
908 |
- } |
909 |
- case UPNP_EVENT_SUBSCRIBE_COMPLETE: |
910 |
-@@ -1261,19 +1319,38 @@ upnpDiscovery: |
911 |
- //fprintf(stderr, "Callback: UPNP_EVENT_RENEWAL_COMPLETE\n"); |
912 |
- msg << "error(UPNP_EVENT_RENEWAL_COMPLETE): "; |
913 |
- upnpEventRenewalComplete: |
914 |
-+#if UPNP_VERSION >= 10800 |
915 |
- UpnpEventSubscribe *es_event = (UpnpEventSubscribe *)Event; |
916 |
- int errCode = UpnpEventSubscribe_get_ErrCode(es_event); |
917 |
- if (errCode != UPNP_E_SUCCESS) { |
918 |
-+#else |
919 |
-+ struct Upnp_Event_Subscribe *es_event = |
920 |
-+ (struct Upnp_Event_Subscribe *)Event; |
921 |
-+ if (es_event->ErrCode != UPNP_E_SUCCESS) { |
922 |
-+#endif |
923 |
- msg << "Error in Event Subscribe Callback"; |
924 |
-+#if UPNP_VERSION >= 10800 |
925 |
- UPnP::ProcessErrorMessage(msg.str(), errCode, NULL, NULL); |
926 |
-+#else |
927 |
-+ UPnP::ProcessErrorMessage( |
928 |
-+ msg.str(), es_event->ErrCode, NULL, NULL); |
929 |
-+#endif |
930 |
- } else { |
931 |
- #if 0 |
932 |
-+#if UPNP_VERSION >= 10800 |
933 |
-+ |
934 |
- const UpnpString *publisherUrl = |
935 |
- UpnpEventSubscribe_get_PublisherUrl(es_event); |
936 |
- const char *sid = UpnpEvent_get_SID_cstr(es_event); |
937 |
- int timeOut = UpnpEvent_get_TimeOut(es_event); |
938 |
- TvCtrlPointHandleSubscribeUpdate( |
939 |
- publisherUrl, sid, timeOut); |
940 |
-+#else |
941 |
-+ TvCtrlPointHandleSubscribeUpdate( |
942 |
-+ GET_UPNP_STRING(es_event->PublisherUrl), |
943 |
-+ es_event->Sid, |
944 |
-+ es_event->TimeOut ); |
945 |
-+#endif |
946 |
- #endif |
947 |
- } |
948 |
- break; |
949 |
-@@ -1288,31 +1365,56 @@ upnpEventRenewalComplete: |
950 |
- msg << "error(UPNP_EVENT_SUBSCRIPTION_EXPIRED): "; |
951 |
- msg2 << "UPNP_EVENT_SUBSCRIPTION_EXPIRED: "; |
952 |
- upnpEventSubscriptionExpired: |
953 |
-+#if UPNP_VERSION >= 10800 |
954 |
- UpnpEventSubscribe *es_event = (UpnpEventSubscribe *)Event; |
955 |
-+#else |
956 |
-+ struct Upnp_Event_Subscribe *es_event = |
957 |
-+ (struct Upnp_Event_Subscribe *)Event; |
958 |
-+#endif |
959 |
- Upnp_SID newSID; |
960 |
- memset(newSID, 0, sizeof(Upnp_SID)); |
961 |
- int TimeOut = 1801; |
962 |
-+#if UPNP_VERSION >= 10800 |
963 |
- const char *publisherUrl = |
964 |
- UpnpEventSubscribe_get_PublisherUrl_cstr(es_event); |
965 |
-+#endif |
966 |
- int ret = UpnpSubscribe( |
967 |
- upnpCP->m_UPnPClientHandle, |
968 |
-+#if UPNP_VERSION >= 10800 |
969 |
- publisherUrl, |
970 |
-+#else |
971 |
-+ GET_UPNP_STRING(es_event->PublisherUrl), |
972 |
-+#endif |
973 |
- &TimeOut, |
974 |
- newSID); |
975 |
- if (ret != UPNP_E_SUCCESS) { |
976 |
- msg << "Error Subscribing to EventURL"; |
977 |
-+#if UPNP_VERSION >= 10800 |
978 |
- int errCode = UpnpEventSubscribe_get_ErrCode(es_event); |
979 |
-+#endif |
980 |
- UPnP::ProcessErrorMessage( |
981 |
-+#if UPNP_VERSION >= 10800 |
982 |
- msg.str(), errCode, NULL, NULL); |
983 |
-+#else |
984 |
-+ msg.str(), es_event->ErrCode, NULL, NULL); |
985 |
-+#endif |
986 |
- } else { |
987 |
- ServiceMap::iterator it = |
988 |
-+#if UPNP_VERSION >= 10800 |
989 |
- upnpCP->m_ServiceMap.find(publisherUrl); |
990 |
-+#else |
991 |
-+ upnpCP->m_ServiceMap.find(GET_UPNP_STRING(es_event->PublisherUrl)); |
992 |
-+#endif |
993 |
- if (it != upnpCP->m_ServiceMap.end()) { |
994 |
- CUPnPService &service = *(it->second); |
995 |
- service.SetTimeout(TimeOut); |
996 |
- service.SetSID(newSID); |
997 |
- msg2 << "Re-subscribed to EventURL '" << |
998 |
-+#if UPNP_VERSION >= 10800 |
999 |
- publisherUrl << |
1000 |
-+#else |
1001 |
-+ GET_UPNP_STRING(es_event->PublisherUrl) << |
1002 |
-+#endif |
1003 |
- "' with SID == '" << |
1004 |
- newSID << "'."; |
1005 |
- AddDebugLogLineC(logUPnP, msg2); |
1006 |
-@@ -1331,19 +1433,34 @@ upnpEventSubscriptionExpired: |
1007 |
- case UPNP_CONTROL_ACTION_COMPLETE: { |
1008 |
- //fprintf(stderr, "Callback: UPNP_CONTROL_ACTION_COMPLETE\n"); |
1009 |
- // This is here if we choose to do this asynchronously |
1010 |
-+#if UPNP_VERSION >= 10800 |
1011 |
- UpnpActionComplete *a_event = (UpnpActionComplete *)Event; |
1012 |
- int errCode = UpnpActionComplete_get_ErrCode(a_event); |
1013 |
- IXML_Document *actionResult = |
1014 |
- UpnpActionComplete_get_ActionResult(a_event); |
1015 |
- if (errCode != UPNP_E_SUCCESS) { |
1016 |
-+#else |
1017 |
-+ struct Upnp_Action_Complete *a_event = |
1018 |
-+ (struct Upnp_Action_Complete *)Event; |
1019 |
-+ if (a_event->ErrCode != UPNP_E_SUCCESS) { |
1020 |
-+#endif |
1021 |
- UPnP::ProcessErrorMessage( |
1022 |
- "UpnpSendActionAsync", |
1023 |
-+#if UPNP_VERSION >= 10800 |
1024 |
- errCode, NULL, |
1025 |
- actionResult); |
1026 |
-+#else |
1027 |
-+ a_event->ErrCode, NULL, |
1028 |
-+ a_event->ActionResult); |
1029 |
-+#endif |
1030 |
- } else { |
1031 |
- // Check the response document |
1032 |
- UPnP::ProcessActionResponse( |
1033 |
-+#if UPNP_VERSION >= 10800 |
1034 |
- actionResult, |
1035 |
-+#else |
1036 |
-+ a_event->ActionResult, |
1037 |
-+#endif |
1038 |
- "<UpnpSendActionAsync>"); |
1039 |
- } |
1040 |
- /* No need for any processing here, just print out results. |
1041 |
-@@ -1354,17 +1471,28 @@ upnpEventSubscriptionExpired: |
1042 |
- case UPNP_CONTROL_GET_VAR_COMPLETE: { |
1043 |
- //fprintf(stderr, "Callback: UPNP_CONTROL_GET_VAR_COMPLETE\n"); |
1044 |
- msg << "error(UPNP_CONTROL_GET_VAR_COMPLETE): "; |
1045 |
-+#if UPNP_VERSION >= 10800 |
1046 |
- UpnpStateVarComplete *sv_event = (UpnpStateVarComplete *)Event; |
1047 |
- int errCode = UpnpStateVarComplete_get_ErrCode(sv_event); |
1048 |
- if (errCode != UPNP_E_SUCCESS) { |
1049 |
-+#else |
1050 |
-+ struct Upnp_State_Var_Complete *sv_event = |
1051 |
-+ (struct Upnp_State_Var_Complete *)Event; |
1052 |
-+ if (sv_event->ErrCode != UPNP_E_SUCCESS) { |
1053 |
-+#endif |
1054 |
- msg << "m_UpnpGetServiceVarStatusAsync"; |
1055 |
- UPnP::ProcessErrorMessage( |
1056 |
-+#if UPNP_VERSION >= 10800 |
1057 |
- msg.str(), errCode, NULL, NULL); |
1058 |
-+#else |
1059 |
-+ msg.str(), sv_event->ErrCode, NULL, NULL); |
1060 |
-+#endif |
1061 |
- } else { |
1062 |
- #if 0 |
1063 |
- // Warning: The use of UpnpGetServiceVarStatus and |
1064 |
- // UpnpGetServiceVarStatusAsync is deprecated by the |
1065 |
- // UPnP forum. |
1066 |
-+#if UPNP_VERSION >= 10800 |
1067 |
- const char *ctrlUrl = |
1068 |
- UpnpStateVarComplete_get_CtrlUrl(sv_event); |
1069 |
- const char *stateVarName = |
1070 |
-@@ -1373,6 +1501,12 @@ upnpEventSubscriptionExpired: |
1071 |
- UpnpStateVarComplete_get_CurrentVal(sv_event); |
1072 |
- TvCtrlPointHandleGetVar( |
1073 |
- ctrlUrl, stateVarName, currentVal); |
1074 |
-+#else |
1075 |
-+ TvCtrlPointHandleGetVar( |
1076 |
-+ sv_event->CtrlUrl, |
1077 |
-+ sv_event->StateVarName, |
1078 |
-+ sv_event->CurrentVal ); |
1079 |
-+#endif |
1080 |
- #endif |
1081 |
- } |
1082 |
- break; |
1083 |
-diff --git a/src/UPnPBase.h b/src/UPnPBase.h |
1084 |
-index 92753b86a..efe63bf0f 100644 |
1085 |
---- a/src/UPnPBase.h |
1086 |
-+++ b/src/UPnPBase.h |
1087 |
-@@ -489,9 +489,15 @@ public: |
1088 |
- |
1089 |
- // Callback function |
1090 |
- static int Callback( |
1091 |
-+#if UPNP_VERSION >= 10800 |
1092 |
- Upnp_EventType_e EventType, |
1093 |
- const void *Event, |
1094 |
- void *Cookie); |
1095 |
-+#else |
1096 |
-+ Upnp_EventType EventType, |
1097 |
-+ void* Event, |
1098 |
-+ void* Cookie); |
1099 |
-+#endif |
1100 |
- |
1101 |
- private: |
1102 |
- void OnEventReceived( |
1103 |
--- |
1104 |
-2.24.1 |
1105 |
- |
1106 |
|
1107 |
diff --git a/net-p2p/amule/files/amule-2.3.2-libupnp-1.8.patch b/net-p2p/amule/files/amule-2.3.2-libupnp-1.8.patch |
1108 |
deleted file mode 100644 |
1109 |
index 42672a85a6a..00000000000 |
1110 |
--- a/net-p2p/amule/files/amule-2.3.2-libupnp-1.8.patch |
1111 |
+++ /dev/null |
1112 |
@@ -1,263 +0,0 @@ |
1113 |
-From f6dccde218fed8dabd3c61efce02d29b320858fe Mon Sep 17 00:00:00 2001 |
1114 |
-From: Marcelo Roberto Jimenez <marcelo.jimenez@×××××.com> |
1115 |
-Date: Tue, 2 Oct 2018 18:17:43 -0300 |
1116 |
-Subject: [PATCH] Make aMule compatible with libupnp 1.8 |
1117 |
- |
1118 |
---- |
1119 |
- src/UPnPBase.cpp | 110 +++++++++++++++++++++++++++-------------------- |
1120 |
- src/UPnPBase.h | 6 +-- |
1121 |
- 2 files changed, 66 insertions(+), 50 deletions(-) |
1122 |
- |
1123 |
-diff --git a/src/UPnPBase.cpp b/src/UPnPBase.cpp |
1124 |
-index 01a7c3a05..d4063a136 100644 |
1125 |
---- a/src/UPnPBase.cpp |
1126 |
-+++ b/src/UPnPBase.cpp |
1127 |
-@@ -1127,7 +1127,7 @@ bool CUPnPControlPoint::PrivateDeletePortMapping( |
1128 |
- |
1129 |
- |
1130 |
- // This function is static |
1131 |
--int CUPnPControlPoint::Callback(Upnp_EventType EventType, void *Event, void * /*Cookie*/) |
1132 |
-+int CUPnPControlPoint::Callback(Upnp_EventType_e EventType, const void *Event, void * /*Cookie*/) |
1133 |
- { |
1134 |
- std::ostringstream msg; |
1135 |
- std::ostringstream msg2; |
1136 |
-@@ -1149,24 +1149,25 @@ int CUPnPControlPoint::Callback(Upnp_EventType EventType, void *Event, void * /* |
1137 |
- msg2<< "UPNP_DISCOVERY_SEARCH_RESULT: "; |
1138 |
- // UPnP Discovery |
1139 |
- upnpDiscovery: |
1140 |
-- struct Upnp_Discovery *d_event = (struct Upnp_Discovery *)Event; |
1141 |
-+ UpnpDiscovery *d_event = (UpnpDiscovery *)Event; |
1142 |
- IXML_Document *doc = NULL; |
1143 |
-- int ret; |
1144 |
-- if (d_event->ErrCode != UPNP_E_SUCCESS) { |
1145 |
-- msg << UpnpGetErrorMessage(d_event->ErrCode) << "."; |
1146 |
-+ int errCode = UpnpDiscovery_get_ErrCode(d_event); |
1147 |
-+ if (errCode != UPNP_E_SUCCESS) { |
1148 |
-+ msg << UpnpGetErrorMessage(errCode) << "."; |
1149 |
- AddDebugLogLineC(logUPnP, msg); |
1150 |
- } |
1151 |
- // Get the XML tree device description in doc |
1152 |
-- ret = UpnpDownloadXmlDoc(d_event->Location, &doc); |
1153 |
-+ const char *location = UpnpDiscovery_get_Location_cstr(d_event); |
1154 |
-+ int ret = UpnpDownloadXmlDoc(location, &doc); |
1155 |
- if (ret != UPNP_E_SUCCESS) { |
1156 |
- msg << "Error retrieving device description from " << |
1157 |
-- d_event->Location << ": " << |
1158 |
-+ location << ": " << |
1159 |
- UpnpGetErrorMessage(ret) << |
1160 |
- "(" << ret << ")."; |
1161 |
- AddDebugLogLineC(logUPnP, msg); |
1162 |
- } else { |
1163 |
- msg2 << "Retrieving device description from " << |
1164 |
-- d_event->Location << "."; |
1165 |
-+ location << "."; |
1166 |
- AddDebugLogLineN(logUPnP, msg2); |
1167 |
- } |
1168 |
- if (doc) { |
1169 |
-@@ -1194,8 +1195,9 @@ upnpDiscovery: |
1170 |
- AddDebugLogLineC(logUPnP, msg); |
1171 |
- } |
1172 |
- // Add the root device to our list |
1173 |
-+ int expires = UpnpDiscovery_get_Expires(d_event); |
1174 |
- upnpCP->AddRootDevice(rootDevice, urlBase, |
1175 |
-- d_event->Location, d_event->Expires); |
1176 |
-+ location, expires); |
1177 |
- } |
1178 |
- // Free the XML doc tree |
1179 |
- IXML::Document::Free(doc); |
1180 |
-@@ -1216,28 +1218,35 @@ upnpDiscovery: |
1181 |
- case UPNP_DISCOVERY_ADVERTISEMENT_BYEBYE: { |
1182 |
- //fprintf(stderr, "Callback: UPNP_DISCOVERY_ADVERTISEMENT_BYEBYE\n"); |
1183 |
- // UPnP Device Removed |
1184 |
-- struct Upnp_Discovery *dab_event = (struct Upnp_Discovery *)Event; |
1185 |
-- if (dab_event->ErrCode != UPNP_E_SUCCESS) { |
1186 |
-+ UpnpDiscovery *dab_event = (UpnpDiscovery *)Event; |
1187 |
-+ int errCode = UpnpDiscovery_get_ErrCode(dab_event); |
1188 |
-+ if (errCode != UPNP_E_SUCCESS) { |
1189 |
- msg << "error(UPNP_DISCOVERY_ADVERTISEMENT_BYEBYE): " << |
1190 |
-- UpnpGetErrorMessage(dab_event->ErrCode) << |
1191 |
-+ UpnpGetErrorMessage(errCode) << |
1192 |
- "."; |
1193 |
- AddDebugLogLineC(logUPnP, msg); |
1194 |
- } |
1195 |
-- std::string devType = dab_event->DeviceType; |
1196 |
-+ std::string devType = UpnpDiscovery_get_DeviceType_cstr(dab_event); |
1197 |
- // Check for an InternetGatewayDevice and removes it from the list |
1198 |
-- std::transform(devType.begin(), devType.end(), devType.begin(), tolower); |
1199 |
-+ std::transform(devType.begin(), devType.end(), |
1200 |
-+ devType.begin(), tolower); |
1201 |
- if (stdStringIsEqualCI(devType, UPnP::Device::IGW)) { |
1202 |
-- upnpCP->RemoveRootDevice(dab_event->DeviceId); |
1203 |
-+ const char *deviceID = |
1204 |
-+ UpnpDiscovery_get_DeviceID_cstr(dab_event); |
1205 |
-+ upnpCP->RemoveRootDevice(deviceID); |
1206 |
- } |
1207 |
- break; |
1208 |
- } |
1209 |
- case UPNP_EVENT_RECEIVED: { |
1210 |
- //fprintf(stderr, "Callback: UPNP_EVENT_RECEIVED\n"); |
1211 |
- // Event reveived |
1212 |
-- struct Upnp_Event *e_event = (struct Upnp_Event *)Event; |
1213 |
-- const std::string Sid = e_event->Sid; |
1214 |
-+ UpnpEvent *e_event = (UpnpEvent *)Event; |
1215 |
-+ int eventKey = UpnpEvent_get_EventKey(e_event); |
1216 |
-+ IXML_Document *changedVariables = |
1217 |
-+ UpnpEvent_get_ChangedVariables(e_event); |
1218 |
-+ const std::string sid = UpnpEvent_get_SID_cstr(e_event); |
1219 |
- // Parses the event |
1220 |
-- upnpCP->OnEventReceived(Sid, e_event->EventKey, e_event->ChangedVariables); |
1221 |
-+ upnpCP->OnEventReceived(sid, eventKey, changedVariables); |
1222 |
- break; |
1223 |
- } |
1224 |
- case UPNP_EVENT_SUBSCRIBE_COMPLETE: |
1225 |
-@@ -1252,24 +1261,23 @@ upnpDiscovery: |
1226 |
- //fprintf(stderr, "Callback: UPNP_EVENT_RENEWAL_COMPLETE\n"); |
1227 |
- msg << "error(UPNP_EVENT_RENEWAL_COMPLETE): "; |
1228 |
- upnpEventRenewalComplete: |
1229 |
-- struct Upnp_Event_Subscribe *es_event = |
1230 |
-- (struct Upnp_Event_Subscribe *)Event; |
1231 |
-- if (es_event->ErrCode != UPNP_E_SUCCESS) { |
1232 |
-+ UpnpEventSubscribe *es_event = (UpnpEventSubscribe *)Event; |
1233 |
-+ int errCode = UpnpEventSubscribe_get_ErrCode(es_event); |
1234 |
-+ if (errCode != UPNP_E_SUCCESS) { |
1235 |
- msg << "Error in Event Subscribe Callback"; |
1236 |
-- UPnP::ProcessErrorMessage( |
1237 |
-- msg.str(), es_event->ErrCode, NULL, NULL); |
1238 |
-+ UPnP::ProcessErrorMessage(msg.str(), errCode, NULL, NULL); |
1239 |
- } else { |
1240 |
- #if 0 |
1241 |
-+ const UpnpString *publisherUrl = |
1242 |
-+ UpnpEventSubscribe_get_PublisherUrl(es_event); |
1243 |
-+ const char *sid = UpnpEvent_get_SID_cstr(es_event); |
1244 |
-+ int timeOut = UpnpEvent_get_TimeOut(es_event); |
1245 |
- TvCtrlPointHandleSubscribeUpdate( |
1246 |
-- GET_UPNP_STRING(es_event->PublisherUrl), |
1247 |
-- es_event->Sid, |
1248 |
-- es_event->TimeOut ); |
1249 |
-+ publisherUrl, sid, timeOut); |
1250 |
- #endif |
1251 |
- } |
1252 |
-- |
1253 |
- break; |
1254 |
- } |
1255 |
-- |
1256 |
- case UPNP_EVENT_AUTORENEWAL_FAILED: |
1257 |
- //fprintf(stderr, "Callback: UPNP_EVENT_AUTORENEWAL_FAILED\n"); |
1258 |
- msg << "error(UPNP_EVENT_AUTORENEWAL_FAILED): "; |
1259 |
-@@ -1280,29 +1288,31 @@ upnpEventRenewalComplete: |
1260 |
- msg << "error(UPNP_EVENT_SUBSCRIPTION_EXPIRED): "; |
1261 |
- msg2 << "UPNP_EVENT_SUBSCRIPTION_EXPIRED: "; |
1262 |
- upnpEventSubscriptionExpired: |
1263 |
-- struct Upnp_Event_Subscribe *es_event = |
1264 |
-- (struct Upnp_Event_Subscribe *)Event; |
1265 |
-+ UpnpEventSubscribe *es_event = (UpnpEventSubscribe *)Event; |
1266 |
- Upnp_SID newSID; |
1267 |
- memset(newSID, 0, sizeof(Upnp_SID)); |
1268 |
- int TimeOut = 1801; |
1269 |
-+ const char *publisherUrl = |
1270 |
-+ UpnpEventSubscribe_get_PublisherUrl_cstr(es_event); |
1271 |
- int ret = UpnpSubscribe( |
1272 |
- upnpCP->m_UPnPClientHandle, |
1273 |
-- GET_UPNP_STRING(es_event->PublisherUrl), |
1274 |
-+ publisherUrl, |
1275 |
- &TimeOut, |
1276 |
- newSID); |
1277 |
- if (ret != UPNP_E_SUCCESS) { |
1278 |
- msg << "Error Subscribing to EventURL"; |
1279 |
-+ int errCode = UpnpEventSubscribe_get_ErrCode(es_event); |
1280 |
- UPnP::ProcessErrorMessage( |
1281 |
-- msg.str(), es_event->ErrCode, NULL, NULL); |
1282 |
-+ msg.str(), errCode, NULL, NULL); |
1283 |
- } else { |
1284 |
- ServiceMap::iterator it = |
1285 |
-- upnpCP->m_ServiceMap.find(GET_UPNP_STRING(es_event->PublisherUrl)); |
1286 |
-+ upnpCP->m_ServiceMap.find(publisherUrl); |
1287 |
- if (it != upnpCP->m_ServiceMap.end()) { |
1288 |
- CUPnPService &service = *(it->second); |
1289 |
- service.SetTimeout(TimeOut); |
1290 |
- service.SetSID(newSID); |
1291 |
- msg2 << "Re-subscribed to EventURL '" << |
1292 |
-- GET_UPNP_STRING(es_event->PublisherUrl) << |
1293 |
-+ publisherUrl << |
1294 |
- "' with SID == '" << |
1295 |
- newSID << "'."; |
1296 |
- AddDebugLogLineC(logUPnP, msg2); |
1297 |
-@@ -1321,17 +1331,19 @@ upnpEventSubscriptionExpired: |
1298 |
- case UPNP_CONTROL_ACTION_COMPLETE: { |
1299 |
- //fprintf(stderr, "Callback: UPNP_CONTROL_ACTION_COMPLETE\n"); |
1300 |
- // This is here if we choose to do this asynchronously |
1301 |
-- struct Upnp_Action_Complete *a_event = |
1302 |
-- (struct Upnp_Action_Complete *)Event; |
1303 |
-- if (a_event->ErrCode != UPNP_E_SUCCESS) { |
1304 |
-+ UpnpActionComplete *a_event = (UpnpActionComplete *)Event; |
1305 |
-+ int errCode = UpnpActionComplete_get_ErrCode(a_event); |
1306 |
-+ IXML_Document *actionResult = |
1307 |
-+ UpnpActionComplete_get_ActionResult(a_event); |
1308 |
-+ if (errCode != UPNP_E_SUCCESS) { |
1309 |
- UPnP::ProcessErrorMessage( |
1310 |
- "UpnpSendActionAsync", |
1311 |
-- a_event->ErrCode, NULL, |
1312 |
-- a_event->ActionResult); |
1313 |
-+ errCode, NULL, |
1314 |
-+ actionResult); |
1315 |
- } else { |
1316 |
- // Check the response document |
1317 |
- UPnP::ProcessActionResponse( |
1318 |
-- a_event->ActionResult, |
1319 |
-+ actionResult, |
1320 |
- "<UpnpSendActionAsync>"); |
1321 |
- } |
1322 |
- /* No need for any processing here, just print out results. |
1323 |
-@@ -1342,21 +1354,25 @@ upnpEventSubscriptionExpired: |
1324 |
- case UPNP_CONTROL_GET_VAR_COMPLETE: { |
1325 |
- //fprintf(stderr, "Callback: UPNP_CONTROL_GET_VAR_COMPLETE\n"); |
1326 |
- msg << "error(UPNP_CONTROL_GET_VAR_COMPLETE): "; |
1327 |
-- struct Upnp_State_Var_Complete *sv_event = |
1328 |
-- (struct Upnp_State_Var_Complete *)Event; |
1329 |
-- if (sv_event->ErrCode != UPNP_E_SUCCESS) { |
1330 |
-+ UpnpStateVarComplete *sv_event = (UpnpStateVarComplete *)Event; |
1331 |
-+ int errCode = UpnpStateVarComplete_get_ErrCode(sv_event); |
1332 |
-+ if (errCode != UPNP_E_SUCCESS) { |
1333 |
- msg << "m_UpnpGetServiceVarStatusAsync"; |
1334 |
- UPnP::ProcessErrorMessage( |
1335 |
-- msg.str(), sv_event->ErrCode, NULL, NULL); |
1336 |
-+ msg.str(), errCode, NULL, NULL); |
1337 |
- } else { |
1338 |
- #if 0 |
1339 |
- // Warning: The use of UpnpGetServiceVarStatus and |
1340 |
- // UpnpGetServiceVarStatusAsync is deprecated by the |
1341 |
- // UPnP forum. |
1342 |
-+ const char *ctrlUrl = |
1343 |
-+ UpnpStateVarComplete_get_CtrlUrl(sv_event); |
1344 |
-+ const char *stateVarName = |
1345 |
-+ UpnpStateVarComplete_get_StateVarName(sv_event); |
1346 |
-+ const DOMString currentVal = |
1347 |
-+ UpnpStateVarComplete_get_CurrentVal(sv_event); |
1348 |
- TvCtrlPointHandleGetVar( |
1349 |
-- sv_event->CtrlUrl, |
1350 |
-- sv_event->StateVarName, |
1351 |
-- sv_event->CurrentVal ); |
1352 |
-+ ctrlUrl, stateVarName, currentVal); |
1353 |
- #endif |
1354 |
- } |
1355 |
- break; |
1356 |
-diff --git a/src/UPnPBase.h b/src/UPnPBase.h |
1357 |
-index 9eafbd143..92753b86a 100644 |
1358 |
---- a/src/UPnPBase.h |
1359 |
-+++ b/src/UPnPBase.h |
1360 |
-@@ -489,9 +489,9 @@ public: |
1361 |
- |
1362 |
- // Callback function |
1363 |
- static int Callback( |
1364 |
-- Upnp_EventType EventType, |
1365 |
-- void* Event, |
1366 |
-- void* Cookie); |
1367 |
-+ Upnp_EventType_e EventType, |
1368 |
-+ const void *Event, |
1369 |
-+ void *Cookie); |
1370 |
- |
1371 |
- private: |
1372 |
- void OnEventReceived( |
1373 |
--- |
1374 |
-2.24.1 |
1375 |
- |