Changes of Revision 36
aMule.spec
Changed
x
1
2
Name: aMule
3
Summary: Another eMule file-sharing program
4
-Version: 2.3.1+git20160125.1804
5
+Version: 2.3.1+git20160212.1136
6
Release: 0
7
License: GPL-2.0+
8
Group: Productivity/Networking/Other
9
update.diff.xz
Changed
1030
1
2
+diff --git a/docs/Changelog b/docs/Changelog
3
+index 1b53b40..1dedb12 100644
4
+--- a/docs/Changelog
5
++++ b/docs/Changelog
6
+@@ -25,6 +25,7 @@ Version 2.4.0 - The river knows.
7
+ the locale has been set
8
+ * Fix Crypto++ detection routine happily using build library
9
+ for host when cross-compiling
10
++ * Fix bug #1711: Kad Info tab should display my own user ID
11
+
12
+ iz0bbz:
13
+ * Fix WinSock library version detection with MinGW-w64
14
+diff --git a/m4/boost.m4 b/m4/boost.m4
15
+index 928a3d6..9acd270 100644
16
+--- a/m4/boost.m4
17
++++ b/m4/boost.m4
18
+@@ -585,27 +585,79 @@ LDFLAGS=$boost_filesystem_save_LDFLAGS
19
+ # BOOST_CONTEXT([PREFERRED-RT-OPT])
20
+ # -----------------------------------
21
+ # Look for Boost.Context. For the documentation of PREFERRED-RT-OPT, see the
22
+-# documentation of BOOST_FIND_LIB above. This library was introduced in Boost
23
+-# 1.51.0
24
++# documentation of BOOST_FIND_LIB above.
25
++#
26
++# * This library was introduced in Boost 1.51.0
27
++# * The signatures of make_fcontext() and jump_fcontext were changed in 1.56.0
28
++# * A dependency on boost_thread appears in 1.57.0
29
+ BOOST_DEFUN([Context],
30
+-[BOOST_FIND_LIB([context], [$1],
31
++[boost_context_save_LIBS=$LIBS
32
++ boost_context_save_LDFLAGS=$LDFLAGS
33
++if test $boost_major_version -ge 157; then
34
++ BOOST_THREAD([$1])
35
++ m4_pattern_allow([^BOOST_THREAD_(LIBS|LDFLAGS)$])dnl
36
++ LIBS="$LIBS $BOOST_THREAD_LIBS"
37
++ LDFLAGS="$LDFLAGS $BOOST_THREAD_LDFLAGS"
38
++fi
39
++BOOST_FIND_LIB([context], [$1],
40
+ [boost/context/all.hpp],[[
41
++
42
+ // creates a stack
43
+ void * stack_pointer = new void*[4096];
44
+ std::size_t const size = sizeof(void*[4096]);
45
+
46
+-// context fc uses f() as context function
47
+-// fcontext_t is placed on top of context stack
48
+-// a pointer to fcontext_t is returned
49
++#if BOOST_VERSION <= 105100
50
++ctx::make_fcontext(&fc, f);
51
++return ctx::jump_fcontext(&fcm, &fc, 3) == 6;
52
++
53
++#else
54
++
55
+ fc = ctx::make_fcontext(stack_pointer, size, f);
56
+-return ctx::jump_fcontext(&fcm, fc, 3) == 6;]],[dnl
57
++return ctx::jump_fcontext(&fcm, fc, 3) == 6;
58
++
59
++#endif
60
++
61
++
62
++]],[dnl
63
++
64
++#include <boost/version.hpp>
65
++#if BOOST_VERSION <= 105100
66
++
67
++namespace ctx = boost::ctx;
68
++
69
++static ctx::fcontext_t fcm, fc;
70
++
71
++static void f(intptr_t i) {
72
++ ctx::jump_fcontext(&fc, &fcm, i * 2);
73
++}
74
++
75
++#elif BOOST_VERSION <= 105500
76
++
77
+ namespace ctx = boost::context;
78
++
79
+ // context
80
+ static ctx::fcontext_t fcm, *fc;
81
++
82
+ // context-function
83
+ static void f(intptr_t i) {
84
+ ctx::jump_fcontext(fc, &fcm, i * 2);
85
+-}])
86
++}
87
++
88
++#else
89
++
90
++namespace ctx = boost::context;
91
++
92
++// context
93
++static ctx::fcontext_t fcm, fc;
94
++
95
++// context-function
96
++static void f(intptr_t i) {
97
++ ctx::jump_fcontext(&fc, fcm, i * 2);
98
++}
99
++#endif
100
++])
101
++LIBS=$boost_context_save_LIBS
102
++LDFLAGS=$boost_context_save_LDFLAGS
103
+ ])# BOOST_CONTEXT
104
+
105
+
106
+@@ -637,10 +689,21 @@ m4_pattern_allow([^BOOST_(CONTEXT|SYSTEM)_(LIBS|LDFLAGS)])
107
+ LIBS="$LIBS $BOOST_CONTEXT_LIBS $BOOST_SYSTEM_LIBS"
108
+ LDFLAGS="$LDFLAGS $BOOST_CONTEXT_LDFLAGS"
109
+
110
+-BOOST_FIND_LIB([coroutine], [$1],
111
+- [boost/coroutine/coroutine.hpp],
112
+- [boost::coroutines::coroutine< int(int) > coro; coro.empty();])
113
+-
114
++# in 1.53 coroutine was a header only library
115
++if test $boost_major_version -eq 153; then
116
++ BOOST_FIND_HEADER([boost/coroutine/coroutine.hpp])
117
++else
118
++ BOOST_FIND_LIB([coroutine], [$1],
119
++ [boost/coroutine/coroutine.hpp],
120
++ [
121
++ #include <boost/version.hpp>
122
++ #if BOOST_VERSION <= 105500
123
++ boost::coroutines::coroutine<int(int)> coro; coro.get();
124
++ #else
125
++ boost::coroutines::asymmetric_coroutine<int>::pull_type coro; coro.get();
126
++ #endif
127
++ ])
128
++fi
129
+ # Link-time dependency from coroutine to context, existed only in 1.53, in 1.54
130
+ # coroutine doesn't use context from its headers but from its library.
131
+ if test $boost_major_version -eq 153 || test $enable_static_boost = yes && test $boost_major_version -ge 154; then
132
+@@ -752,8 +815,19 @@ BOOST_DEFUN([Geometry],
133
+ # Look for Boost.Graphs. For the documentation of PREFERRED-RT-OPT, see the
134
+ # documentation of BOOST_FIND_LIB above.
135
+ BOOST_DEFUN([Graph],
136
+-[BOOST_FIND_LIB([graph], [$1],
137
++[boost_graph_save_LIBS=$LIBS
138
++boost_graph_save_LDFLAGS=$LDFLAGS
139
++# Link-time dependency from graph to regex was added as of 1.40.0.
140
++if test $boost_major_version -ge 140; then
141
++ BOOST_REGEX([$1])
142
++ m4_pattern_allow([^BOOST_REGEX_(LIBS|LDFLAGS)$])dnl
143
++ LIBS="$LIBS $BOOST_REGEX_LIBS"
144
++ LDFLAGS="$LDFLAGS $BOOST_REGEX_LDFLAGS"
145
++fi
146
++BOOST_FIND_LIB([graph], [$1],
147
+ [boost/graph/adjacency_list.hpp], [boost::adjacency_list<> g;])
148
++LIBS=$boost_graph_save_LIBS
149
++LDFLAGS=$boost_graph_save_LDFLAGS
150
+ ])# BOOST_GRAPH
151
+
152
+
153
+@@ -786,9 +860,21 @@ BOOST_DEFUN([Lambda],
154
+ # --------------
155
+ # Look for Boost.Locale
156
+ BOOST_DEFUN([Locale],
157
+-[BOOST_FIND_LIB([locale], [$1],
158
++[
159
++boost_locale_save_LIBS=$LIBS
160
++boost_locale_save_LDFLAGS=$LDFLAGS
161
++# require SYSTEM for boost-1.50.0 and up
162
++if test $boost_major_version -ge 150; then
163
++ BOOST_SYSTEM([$1])
164
++ m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl
165
++ LIBS="$LIBS $BOOST_SYSTEM_LIBS"
166
++ LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS"
167
++fi # end of the Boost.System check.
168
++BOOST_FIND_LIB([locale], [$1],
169
+ [boost/locale.hpp],
170
+ [[boost::locale::generator gen; std::locale::global(gen(""));]])
171
++LIBS=$boost_locale_save_LIBS
172
++LDFLAGS=$boost_locale_save_LDFLAGS
173
+ ])# BOOST_LOCALE
174
+
175
+ # BOOST_LOG([PREFERRED-RT-OPT])
176
+@@ -796,9 +882,19 @@ BOOST_DEFUN([Locale],
177
+ # Look for Boost.Log. For the documentation of PREFERRED-RT-OPT, see the
178
+ # documentation of BOOST_FIND_LIB above.
179
+ BOOST_DEFUN([Log],
180
+-[BOOST_FIND_LIB([log], [$1],
181
++[boost_log_save_LIBS=$LIBS
182
++boost_log_save_LDFLAGS=$LDFLAGS
183
++BOOST_SYSTEM([$1])
184
++BOOST_FILESYSTEM([$1])
185
++BOOST_DATE_TIME([$1])
186
++m4_pattern_allow([^BOOST_(SYSTEM|FILESYSTEM|DATE_TIME)_(LIBS|LDFLAGS)$])dnl
187
++LIBS="$LIBS $BOOST_DATE_TIME_LIBS $BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS"
188
++LDFLAGS="$LDFLAGS $BOOST_DATE_TIME_LDFLAGS $BOOST_FILESYSTEM_LDFLAGS $BOOST_SYSTEM_LDFLAGS"
189
++BOOST_FIND_LIB([log], [$1],
190
+ [boost/log/core/core.hpp],
191
+ [boost::log::attribute a; a.get_value();])
192
++LIBS=$boost_log_save_LIBS
193
++LDFLAGS=$boost_log_save_LDFLAGS
194
+ ])# BOOST_LOG
195
+
196
+
197
+@@ -807,10 +903,17 @@ BOOST_DEFUN([Log],
198
+ # Look for Boost.Log. For the documentation of PREFERRED-RT-OPT, see the
199
+ # documentation of BOOST_FIND_LIB above.
200
+ BOOST_DEFUN([Log_Setup],
201
+-[AC_REQUIRE([BOOST_LOG])dnl
202
++[boost_log_setup_save_LIBS=$LIBS
203
++boost_log_setup_save_LDFLAGS=$LDFLAGS
204
++BOOST_LOG([$1])
205
++m4_pattern_allow([^BOOST_LOG_(LIBS|LDFLAGS)$])dnl
206
++LIBS="$LIBS $BOOST_LOG_LIBS"
207
++LDFLAGS="$LDFLAGS $BOOST_LOG_LDFLAGS"
208
+ BOOST_FIND_LIB([log_setup], [$1],
209
+ [boost/log/utility/setup/from_settings.hpp],
210
+ [boost::log::basic_settings<char> bs; bs.empty();])
211
++LIBS=$boost_log_setup_save_LIBS
212
++LDFLAGS=$boost_log_setup_save_LDFLAGS
213
+ ])# BOOST_LOG_SETUP
214
+
215
+
216
+@@ -1306,6 +1409,8 @@ if test x$boost_cv_inc_path != xno; then
217
+ # I'm not sure about my test for `il' (be careful: Intel's ICC pre-defines
218
+ # the same defines as GCC's).
219
+ for i in \
220
++ _BOOST_mingw_test(5, 3) \
221
++ _BOOST_gcc_test(5, 3) \
222
+ _BOOST_mingw_test(5, 2) \
223
+ _BOOST_gcc_test(5, 2) \
224
+ _BOOST_mingw_test(5, 1) \
225
+diff --git a/src/ECSpecialCoreTags.cpp b/src/ECSpecialCoreTags.cpp
226
+index fc378ef..e7bc3d4 100644
227
+--- a/src/ECSpecialCoreTags.cpp
228
++++ b/src/ECSpecialCoreTags.cpp
229
+@@ -148,6 +148,10 @@ CEC_ConnState_Tag::CEC_ConnState_Tag(EC_DETAIL_LEVEL detail_level) : CECTag(EC_T
230
+ }
231
+
232
+ AddTag(CECTag(EC_TAG_CLIENT_ID, theApp->GetID()));
233
++
234
++ if (Kademlia::CKademlia::IsRunning()) {
235
++ AddTag(CECTag(EC_TAG_KAD_ID, Kademlia::CKademlia::GetKadID()));
236
++ }
237
+ }
238
+
239
+ CEC_PartFile_Tag::CEC_PartFile_Tag(const CPartFile *file, EC_DETAIL_LEVEL detail_level, CValueMap *valuemap)
240
+diff --git a/src/ExternalConnector.cpp b/src/ExternalConnector.cpp
241
+index 96b3001..76d22a7 100644
242
+--- a/src/ExternalConnector.cpp
243
++++ b/src/ExternalConnector.cpp
244
+@@ -455,8 +455,10 @@ bool CaMuleExternalConnector::OnCmdLineParsed(wxCmdLineParser& parser)
245
+ }
246
+
247
+ if (!parser.Found(wxT("config-file"), &m_configFileName)) {
248
+- m_configFileName = GetConfigDir() + wxT("remote.conf");
249
++ m_configFileName = wxT("remote.conf");
250
+ }
251
++ m_configDir = GetConfigDir(m_configFileName);
252
++ m_configFileName = m_configDir + m_configFileName;
253
+
254
+ wxString aMuleConfigFile;
255
+ if (parser.Found(wxT("create-config-from"), &aMuleConfigFile)) {
256
+@@ -536,8 +538,8 @@ void CaMuleExternalConnector::LoadConfigFile()
257
+
258
+ void CaMuleExternalConnector::SaveConfigFile()
259
+ {
260
+- if (!wxFileName::DirExists(GetConfigDir())) {
261
+- wxFileName::Mkdir(GetConfigDir());
262
++ if (!wxFileName::DirExists(m_configDir)) {
263
++ wxFileName::Mkdir(m_configDir);
264
+ }
265
+ if (!m_configFile) {
266
+ m_configFile = new CECFileConfig(m_configFileName);
267
+diff --git a/src/ExternalConnector.h b/src/ExternalConnector.h
268
+index 38b731c..4d1c5c3 100644
269
+--- a/src/ExternalConnector.h
270
++++ b/src/ExternalConnector.h
271
+@@ -154,14 +154,13 @@ public:
272
+ void OnAssertFailure(const wxChar *file, int line, const wxChar *func, const wxChar *cond, const wxChar *msg);
273
+ #endif
274
+
275
+- CECFileConfig* m_configFile;
276
+- wxString m_configFileName;
277
+-
278
+ protected:
279
+ // Set current locale, if language is not empty.
280
+ // returns canonical name of set (current) locale
281
+ virtual wxString SetLocale(const wxString& language);
282
+
283
++ CECFileConfig* m_configFile;
284
++ wxString m_configDir;
285
+ long m_port;
286
+ wxString m_host;
287
+ CMD4Hash m_password;
288
+@@ -177,6 +176,7 @@ protected:
289
+ #endif
290
+
291
+ private:
292
++ wxString m_configFileName;
293
+ wxString m_cmdargs;
294
+ wxString m_lastcmdstr;
295
+ CRemoteConnect* m_ECClient;
296
+diff --git a/src/FileDetailDialog.cpp b/src/FileDetailDialog.cpp
297
+index 4c72a65..dd50fdc 100644
298
+--- a/src/FileDetailDialog.cpp
299
++++ b/src/FileDetailDialog.cpp
300
+@@ -63,7 +63,6 @@ m_files(files),
301
+ m_index(index),
302
+ m_filenameChanged(false)
303
+ {
304
+- theApp->m_FileDetailDialogActive++;
305
+ m_timer.SetOwner(this, ID_MY_TIMER);
306
+ m_timer.Start(5000);
307
+ wxSizer *content = fileDetails(this, true);
308
+@@ -75,7 +74,6 @@ m_filenameChanged(false)
309
+
310
+ CFileDetailDialog::~CFileDetailDialog()
311
+ {
312
+- theApp->m_FileDetailDialogActive = 0;
313
+ m_timer.Stop();
314
+ }
315
+
316
+diff --git a/src/GuiEvents.cpp b/src/GuiEvents.cpp
317
+index 0ec31c6..5191aa8 100644
318
+--- a/src/GuiEvents.cpp
319
++++ b/src/GuiEvents.cpp
320
+@@ -775,22 +775,5 @@ namespace MuleNotify
321
+
322
+ #endif // #ifndef CLIENT_GUI
323
+
324
+- void UDPSocketSend(CMuleUDPSocket * NOT_ON_REMOTEGUI(socket))
325
+- {
326
+-#ifndef CLIENT_GUI
327
+- AddDebugLogLineF(logAsio, wxT("UDPSocketSend"));
328
+- socket->OnSend(0);
329
+-#endif
330
+- }
331
+-
332
+- void UDPSocketReceive(CMuleUDPSocket * NOT_ON_REMOTEGUI(socket))
333
+- {
334
+-#ifndef CLIENT_GUI
335
+- AddDebugLogLineF(logAsio, wxT("UDPSocketReceive"));
336
+- socket->OnReceive(0);
337
+-#endif
338
+- }
339
+-
340
+-
341
+ }
342
+ // File_checked_for_headers
343
+diff --git a/src/LibSocketAsio.cpp b/src/LibSocketAsio.cpp
344
+index af06128..29d302d 100644
345
+--- a/src/LibSocketAsio.cpp
346
++++ b/src/LibSocketAsio.cpp
347
+@@ -1491,6 +1491,19 @@ namespace MuleNotify
348
+ socketServer->OnAccept();
349
+ }
350
+
351
++ void UDPSocketSend(CMuleUDPSocket * socket)
352
++ {
353
++ AddDebugLogLineF(logAsio, wxT("UDPSocketSend"));
354
++ socket->OnSend(0);
355
++ }
356
++
357
++ void UDPSocketReceive(CMuleUDPSocket * socket)
358
++ {
359
++ AddDebugLogLineF(logAsio, wxT("UDPSocketReceive"));
360
++ socket->OnReceive(0);
361
++ }
362
++
363
++
364
+ } // namespace MuleNotify
365
+
366
+ //
367
+diff --git a/src/Makefile.am b/src/Makefile.am
368
+index ad90799..934fa4e 100644
369
+--- a/src/Makefile.am
370
++++ b/src/Makefile.am
371
+@@ -86,7 +86,8 @@ libmuleappcommon_a_SOURCES = \
372
+ SHA.cpp \
373
+ Tag.cpp \
374
+ TerminationProcess.cpp \
375
+- Timer.cpp
376
++ Timer.cpp \
377
++ kademlia/utils/UInt128.cpp
378
+
379
+ libmuleappcommon_a_CPPFLAGS = $(AM_CPPFLAGS) $(WXBASE_CPPFLAGS) -I$(srcdir)/libs -I$(srcdir)/include $(CRYPTOPP_CPPFLAGS) $(LIBUPNP_CPPFLAGS)
380
+
381
+@@ -112,8 +113,7 @@ libmuleappcore_a_SOURCES = \
382
+ kademlia/kademlia/Entry.cpp \
383
+ kademlia/kademlia/Indexed.cpp \
384
+ kademlia/kademlia/SearchManager.cpp \
385
+- kademlia/routing/RoutingBin.cpp \
386
+- kademlia/utils/UInt128.cpp
387
++ kademlia/routing/RoutingBin.cpp
388
+
389
+ libmuleappcore_a_CPPFLAGS = $(AM_CPPFLAGS) $(WXBASE_CPPFLAGS) -I$(srcdir)/libs -I$(srcdir)/include $(CRYPTOPP_CPPFLAGS) $(LIBUPNP_CPPFLAGS)
390
+
391
+diff --git a/src/OtherFunctions.cpp b/src/OtherFunctions.cpp
392
+index 4668df4..42d23f7 100644
393
+--- a/src/OtherFunctions.cpp
394
++++ b/src/OtherFunctions.cpp
395
+@@ -1097,27 +1097,24 @@ void DumpMem_DW(const uint32 *ptr, int count)
396
+
397
+ wxString GetConfigDir(const wxString &configFileBase)
398
+ {
399
+- // Cache the path.
400
+- static wxString configPath;
401
++ wxString configPath;
402
+
403
+- if (configPath.IsEmpty()) {
404
+- // "Portable aMule" - Use aMule from an external USB drive
405
+- // Check for ./config/amule.conf (or whatever gets passed as configFile)
406
+- // and use this configuration if found
407
+- const wxString configDir = JoinPaths(wxFileName::GetCwd(), wxT("config"));
408
+- const wxString configFile = JoinPaths(configDir, configFileBase);
409
++ // "Portable aMule" - Use aMule from an external USB drive
410
++ // Check for ./config/amule.conf (or whatever gets passed as configFile)
411
++ // and use this configuration if found
412
++ const wxString configDir = JoinPaths(wxFileName::GetCwd(), wxT("config"));
413
++ const wxString configFile = JoinPaths(configDir, configFileBase);
414
+
415
+- if (CPath::DirExists(configDir) && CPath::FileExists(configFile)) {
416
+- AddLogLineN(CFormat(_("Using config dir: %s")) % configDir);
417
++ if (CPath::DirExists(configDir) && CPath::FileExists(configFile)) {
418
++ AddLogLineN(CFormat(_("Using config dir: %s")) % configDir);
419
+
420
+- configPath = configDir;
421
+- } else {
422
+- configPath = wxStandardPaths::Get().GetUserDataDir();
423
+- }
424
+-
425
+- configPath += wxFileName::GetPathSeparator();
426
++ configPath = configDir;
427
++ } else {
428
++ configPath = wxStandardPaths::Get().GetUserDataDir();
429
+ }
430
+
431
++ configPath += wxFileName::GetPathSeparator();
432
++
433
+ return configPath;
434
+ }
435
+
436
+diff --git a/src/OtherFunctions.h b/src/OtherFunctions.h
437
+index a26127c..a603523 100644
438
+--- a/src/OtherFunctions.h
439
++++ b/src/OtherFunctions.h
440
+@@ -350,7 +350,7 @@ inline long int make_full_ed2k_version(int a, int b, int c) {
441
+ }
442
+
443
+
444
+-wxString GetConfigDir(const wxString &configFile = wxT("amule.conf"));
445
++wxString GetConfigDir(const wxString &configFile);
446
+
447
+ #if !wxCHECK_VERSION(2, 9, 0)
448
+ enum {
449
+diff --git a/src/Preferences.cpp b/src/Preferences.cpp
450
+index 5900c0d..a07ce0e 100644
451
+--- a/src/Preferences.cpp
452
++++ b/src/Preferences.cpp
453
+@@ -849,7 +849,7 @@ public:
454
+ } else {
455
+ folder = wxT("webserver");
456
+ }
457
+- wxString dirName(JoinPaths(GetConfigDir(theApp->m_configFile), folder));
458
++ wxString dirName(JoinPaths(thePrefs::GetConfigDir(), folder));
459
+ wxString Filename;
460
+ wxDir d;
461
+
462
+diff --git a/src/ServerWnd.cpp b/src/ServerWnd.cpp
463
+index d9e4a98..1ee24e7 100644
464
+--- a/src/ServerWnd.cpp
465
++++ b/src/ServerWnd.cpp
466
+@@ -34,6 +34,7 @@
467
+ #include "amuleDlg.h" // Needed for CamuleDlg
468
+ #include "amule.h" // Needed for theApp
469
+ #include "Logger.h"
470
++#include "kademlia/utils/UInt128.h"
471
+
472
+ #include "ClientList.h"
473
+
474
+@@ -206,6 +207,8 @@ void CServerWnd::UpdateKadInfo()
475
+ KadInfoList->SetItem(next_row++, 1, (theApp->IsKadRunningInLanMode() ? _("Running in LAN mode") : _("Running")));
476
+
477
+ // Connection data
478
++ KadInfoList->InsertItem(next_row, _("Kademlia client ID:"));
479
++ KadInfoList->SetItem(next_row++, 1, theApp->GetKadID().ToHexString());
480
+ KadInfoList->InsertItem(next_row, _("Status:"));
481
+ KadInfoList->SetItem(next_row++, 1, theApp->IsConnectedKad() ? _("Connected"): _("Disconnected"));
482
+ if (theApp->IsConnectedKad()) {
483
+diff --git a/src/TextClient.cpp b/src/TextClient.cpp
484
+index c8a3f9e..5d11093 100644
485
+--- a/src/TextClient.cpp
486
++++ b/src/TextClient.cpp
487
+@@ -1033,8 +1033,6 @@ namespace MuleNotify
488
+ {
489
+ void HandleNotification(const class CMuleNotiferBase&) {}
490
+ void HandleNotificationAlways(const class CMuleNotiferBase&) {}
491
+- void UDPSocketSend(class CMuleUDPSocket *) {}
492
+- void UDPSocketReceive(class CMuleUDPSocket *) {}
493
+ }
494
+
495
+ // File_checked_for_headers
496
+diff --git a/src/amule-gui.cpp b/src/amule-gui.cpp
497
+index 415bd86..e1cf577 100644
498
+--- a/src/amule-gui.cpp
499
++++ b/src/amule-gui.cpp
500
+@@ -99,7 +99,6 @@ IMPLEMENT_APP(CamuleGuiApp)
501
+ CamuleGuiBase::CamuleGuiBase()
502
+ {
503
+ amuledlg = NULL;
504
+- m_FileDetailDialogActive = 0;
505
+ }
506
+
507
+
508
+diff --git a/src/amule-remote-gui.cpp b/src/amule-remote-gui.cpp
509
+index f8c174a..1af561a 100644
510
+--- a/src/amule-remote-gui.cpp
511
++++ b/src/amule-remote-gui.cpp
512
+@@ -758,6 +758,7 @@ void CServerConnectRem::HandlePacket(const CECPacket *packet)
513
+ CServer *server;
514
+ m_ID = tag->GetEd2kId();
515
+ theApp->m_clientID = tag->GetClientId();
516
++ tag->GetKadID(theApp->m_kadID);
517
+
518
+ if (tag->IsConnectedED2K()) {
519
+ const CECTag *srvtag = tag->GetTagByName(EC_TAG_SERVER);
520
+diff --git a/src/amule-remote-gui.h b/src/amule-remote-gui.h
521
+index 3f0786a..26bc1e3 100644
522
+--- a/src/amule-remote-gui.h
523
++++ b/src/amule-remote-gui.h
524
+@@ -34,7 +34,7 @@
525
+ #include "Statistics.h"
526
+ #include "RLE.h"
527
+ #include "SearchList.h" // Needed for CSearchFile
528
+-
529
++#include "kademlia/utils/UInt128.h" // Needed for CUInt128
530
+
531
+ class CED2KFileLink;
532
+ class CServer;
533
+@@ -711,6 +711,7 @@ public:
534
+ uint32 GetKadIndexedKeywords() const{ return theStats::GetKadIndexedKeywords(); }
535
+ uint32 GetKadIndexedNotes() const { return theStats::GetKadIndexedNotes(); }
536
+ uint32 GetKadIndexedLoad() const { return theStats::GetKadIndexedLoad(); }
537
++ const CUInt128& GetKadID() const { return m_kadID; }
538
+ // True IP of machine
539
+ uint32 GetKadIPAdress() const { return theStats::GetKadIPAdress(); }
540
+ // Buddy status
541
+@@ -741,6 +742,8 @@ public:
542
+ // This KnownFile collects all currently uploading clients for display in the upload list control
543
+ CKnownFile * m_allUploadingKnownFile;
544
+
545
++ CUInt128 m_kadID;
546
++
547
+ DECLARE_EVENT_TABLE()
548
+ };
549
+
550
+diff --git a/src/amule.cpp b/src/amule.cpp
551
+index 30c3ab4..397bc74 100644
552
+--- a/src/amule.cpp
553
++++ b/src/amule.cpp
554
+@@ -1749,6 +1749,11 @@ uint32 CamuleApp::GetBuddyPort() const
555
+ return clientlist->GetBuddyPort();
556
+ }
557
+
558
++const Kademlia::CUInt128& CamuleApp::GetKadID() const
559
++{
560
++ return Kademlia::CKademlia::GetKadID();
561
++}
562
++
563
+ bool CamuleApp::CanDoCallback(uint32 clientServerIP, uint16 clientServerPort)
564
+ {
565
+ if (Kademlia::CKademlia::IsConnected()) {
566
+diff --git a/src/amule.h b/src/amule.h
567
+index d56eaeb..64cee8d 100644
568
+--- a/src/amule.h
569
++++ b/src/amule.h
570
+@@ -95,10 +95,14 @@ namespace MuleNotify {
571
+ class CMuleGUIEvent;
572
+ }
573
+
574
+-
575
+ using MuleNotify::CMuleGUIEvent;
576
+
577
+
578
++namespace Kademlia {
579
++ class CUInt128;
580
++}
581
++
582
++
583
+ #ifdef AMULE_DAEMON
584
+ #define AMULE_APP_BASE wxAppConsole
585
+ #define CORE_TIMER_PERIOD 300
586
+@@ -228,6 +232,8 @@ public:
587
+ uint8 GetBuddyStatus() const;
588
+ uint32 GetBuddyIP() const;
589
+ uint32 GetBuddyPort() const;
590
++ // Kad ID
591
++ const Kademlia::CUInt128& GetKadID() const;
592
+
593
+ // Check if we should callback this client
594
+ bool CanDoCallback(uint32 clientServerIP, uint16 clientServerPort);
595
+@@ -366,7 +372,6 @@ public:
596
+
597
+ wxString m_FrameTitle;
598
+ CamuleDlg* amuledlg;
599
+- int m_FileDetailDialogActive;
600
+
601
+ bool CopyTextToClipboard( wxString strText );
602
+ void ResetTitle();
603
+diff --git a/src/amuleAppCommon.cpp b/src/amuleAppCommon.cpp
604
+index 5dd9d34..54e7d0e 100644
605
+--- a/src/amuleAppCommon.cpp
606
++++ b/src/amuleAppCommon.cpp
607
+@@ -289,7 +289,7 @@ bool CamuleAppCommon::InitCommon(int argc, wxChar ** argv)
608
+ }
609
+ thePrefs::SetConfigDir(configdir);
610
+ } else {
611
+- thePrefs::SetConfigDir(/*OtherFunctions::*/GetConfigDir());
612
++ thePrefs::SetConfigDir(/*OtherFunctions::*/GetConfigDir(m_configFile));
613
+ }
614
+
615
+ // Backtracing works in MSW.
616
+diff --git a/src/amuleDlg.cpp b/src/amuleDlg.cpp
617
+index 2fac161..3e797d0 100644
618
+--- a/src/amuleDlg.cpp
619
++++ b/src/amuleDlg.cpp
620
+@@ -1210,7 +1210,7 @@ bool CamuleDlg::Check_and_Init_Skin()
621
+ return false;
622
+ }
623
+
624
+- wxString userDir(JoinPaths(GetConfigDir(), wxT("skins")) + wxFileName::GetPathSeparator());
625
++ wxString userDir(JoinPaths(thePrefs::GetConfigDir(), wxT("skins")) + wxFileName::GetPathSeparator());
626
+
627
+ wxStandardPathsBase &spb(wxStandardPaths::Get());
628
+ #ifdef __WINDOWS__
629
+diff --git a/src/kademlia/kademlia/Kademlia.cpp b/src/kademlia/kademlia/Kademlia.cpp
630
+index f08d735..050cbc8 100644
631
+--- a/src/kademlia/kademlia/Kademlia.cpp
632
++++ b/src/kademlia/kademlia/Kademlia.cpp
633
+@@ -54,6 +54,8 @@ there client on the eMule forum..
634
+ #pragma warning(disable:4996)
635
+ #endif
636
+
637
++const CUInt128 Kademlia::s_nullUInt128(false);
638
++
639
+ ////////////////////////////////////////
640
+ using namespace Kademlia;
641
+ ////////////////////////////////////////
642
+diff --git a/src/kademlia/kademlia/Kademlia.h b/src/kademlia/kademlia/Kademlia.h
643
+index 035fd3a..5f64a20 100644
644
+--- a/src/kademlia/kademlia/Kademlia.h
645
++++ b/src/kademlia/kademlia/Kademlia.h
646
+@@ -59,6 +59,8 @@ class CKadClientSearcher;
647
+
648
+ typedef std::map<CRoutingZone*, CRoutingZone*> EventMap;
649
+
650
++extern const CUInt128 s_nullUInt128;
651
++
652
+ class CKademlia
653
+ {
654
+ public:
655
+@@ -84,6 +86,8 @@ public:
656
+ static uint32_t GetTotalFile() throw() { return instance && instance->m_prefs ? instance->m_prefs->GetTotalFile() : 0; }
657
+ static bool GetPublish() throw() { return instance && instance->m_prefs ? instance->m_prefs->GetPublish() : false; }
658
+ static uint32_t GetIPAddress() throw() { return instance && instance->m_prefs ? instance->m_prefs->GetIPAddress() : 0; }
659
++ static const CUInt128& GetKadID() throw() { return instance && instance->m_prefs ? instance->m_prefs->GetKadID() : s_nullUInt128; }
660
++
661
+ static void Bootstrap(uint32_t ip, uint16_t port)
662
+ {
663
+ time_t now = time(NULL);
664
+diff --git a/src/libs/ec/abstracts/ECCodes.abstract b/src/libs/ec/abstracts/ECCodes.abstract
665
+index 3f07f7b..37a498d 100644
666
+--- a/src/libs/ec/abstracts/ECCodes.abstract
667
++++ b/src/libs/ec/abstracts/ECCodes.abstract
668
+@@ -171,6 +171,7 @@ EC_TAG_CAN_ZLIB 0x000C
669
+ EC_TAG_CAN_UTF8_NUMBERS 0x000D
670
+ EC_TAG_CAN_NOTIFY 0x000E
671
+ EC_TAG_ECID 0x000F
672
++EC_TAG_KAD_ID 0x0010
673
+
674
+
675
+ EC_TAG_CLIENT_NAME 0x0100
676
+diff --git a/src/libs/ec/abstracts/ECTagTypes.abstract b/src/libs/ec/abstracts/ECTagTypes.abstract
677
+index 3f70bd5..8950691 100644
678
+--- a/src/libs/ec/abstracts/ECTagTypes.abstract
679
++++ b/src/libs/ec/abstracts/ECTagTypes.abstract
680
+@@ -17,4 +17,5 @@ EC_TAGTYPE_STRING 6
681
+ EC_TAGTYPE_DOUBLE 7
682
+ EC_TAGTYPE_IPV4 8
683
+ EC_TAGTYPE_HASH16 9
684
++EC_TAGTYPE_UINT128 10
685
+ [/Section]
686
+diff --git a/src/libs/ec/cpp/ECCodes.h b/src/libs/ec/cpp/ECCodes.h
687
+index 7b44ba5..9de696c 100644
688
+--- a/src/libs/ec/cpp/ECCodes.h
689
++++ b/src/libs/ec/cpp/ECCodes.h
690
+@@ -141,6 +141,7 @@ enum ECTagNames {
691
+ EC_TAG_CAN_UTF8_NUMBERS = 0x000D,
692
+ EC_TAG_CAN_NOTIFY = 0x000E,
693
+ EC_TAG_ECID = 0x000F,
694
++ EC_TAG_KAD_ID = 0x0010,
695
+ EC_TAG_CLIENT_NAME = 0x0100,
696
+ EC_TAG_CLIENT_VERSION = 0x0101,
697
+ EC_TAG_CLIENT_MOD = 0x0102,
698
+@@ -577,6 +578,7 @@ wxString GetDebugNameECTagNames(uint16 arg)
699
+ case 0x000D: return wxT("EC_TAG_CAN_UTF8_NUMBERS");
700
+ case 0x000E: return wxT("EC_TAG_CAN_NOTIFY");
701
+ case 0x000F: return wxT("EC_TAG_ECID");
702
++ case 0x0010: return wxT("EC_TAG_KAD_ID");
703
+ case 0x0100: return wxT("EC_TAG_CLIENT_NAME");
704
+ case 0x0101: return wxT("EC_TAG_CLIENT_VERSION");
705
+ case 0x0102: return wxT("EC_TAG_CLIENT_MOD");
706
+diff --git a/src/libs/ec/cpp/ECFileConfig.h b/src/libs/ec/cpp/ECFileConfig.h
707
+index 7ba02fb..367a139 100644
708
+--- a/src/libs/ec/cpp/ECFileConfig.h
709
++++ b/src/libs/ec/cpp/ECFileConfig.h
710
+@@ -39,7 +39,7 @@
711
+ inline wxString FinalizeFilename(const wxString filename)
712
+ {
713
+ if (wxStrchr(filename, wxFileName::GetPathSeparator()) == NULL) {
714
+- return GetConfigDir() + filename;
715
++ return GetConfigDir(filename) + filename;
716
+ }
717
+ if ((filename.GetChar(0) == '~') && (filename.GetChar(1) == wxFileName::GetPathSeparator())) {
718
+ return wxGetHomeDir() + filename.Mid(1);
719
+diff --git a/src/libs/ec/cpp/ECSpecialTags.h b/src/libs/ec/cpp/ECSpecialTags.h
720
+index 6921b2f..e07cf3b 100644
721
+--- a/src/libs/ec/cpp/ECSpecialTags.h
722
++++ b/src/libs/ec/cpp/ECSpecialTags.h
723
+@@ -30,7 +30,7 @@
724
+ #include "../../../NetworkFunctions.h" // Needed for IsLowID
725
+ #include "../../../ClientCredits.h" // Needed for EIdentState
726
+ #include <common/Format.h> // Needed for CFormat
727
+-
728
++#include "../../../kademlia/utils/UInt128.h"
729
+
730
+ #include <map>
731
+
732
+@@ -65,6 +65,7 @@ class CValueMap {
733
+ std::map<ec_tagname_t, uint32> m_map_uint32;
734
+ std::map<ec_tagname_t, uint64> m_map_uint64;
735
+ std::map<ec_tagname_t, CMD4Hash> m_map_md4;
736
++ std::map<ec_tagname_t, CUInt128> m_map_uint128;
737
+ std::map<ec_tagname_t, wxString> m_map_string;
738
+ std::map<ec_tagname_t, CECTag> m_map_tag;
739
+
740
+@@ -88,6 +89,7 @@ class CValueMap {
741
+ m_map_uint32 = valuemap.m_map_uint32;
742
+ m_map_uint64 = valuemap.m_map_uint64;
743
+ m_map_md4 = valuemap.m_map_md4;
744
++ m_map_uint128 = valuemap.m_map_uint128;
745
+ m_map_string = valuemap.m_map_string;
746
+ m_map_tag = valuemap.m_map_tag;
747
+ }
748
+@@ -117,6 +119,11 @@ class CValueMap {
749
+ CreateTagT<CMD4Hash>(tagname, value, m_map_md4, parent);
750
+ }
751
+
752
++ void CreateTag(ec_tagname_t tagname, CUInt128 value, CECTag *parent)
753
++ {
754
++ CreateTagT<CUInt128>(tagname, value, m_map_uint128, parent);
755
++ }
756
++
757
+ void CreateTag(ec_tagname_t tagname, wxString value, CECTag *parent)
758
+ {
759
+ CreateTagT<wxString>(tagname, value, m_map_string, parent);
760
+@@ -201,6 +208,7 @@ class CEC_ConnState_Tag : public CECTag {
761
+ bool IsConnectedKademlia() const { return (GetInt() & 0x04) != 0; }
762
+ bool IsKadFirewalled() const { return (GetInt() & 0x08) != 0; }
763
+ bool IsKadRunning() const { return (GetInt() & 0x10) != 0; }
764
++ bool GetKadID(CUInt128& target) const { return AssignIfExist(EC_TAG_KAD_ID, target); }
765
+ };
766
+
767
+ class CEC_SharedFile_Tag : public CECTag {
768
+diff --git a/src/libs/ec/cpp/ECTag.cpp b/src/libs/ec/cpp/ECTag.cpp
769
+index cb1c2d7..3b83220 100644
770
+--- a/src/libs/ec/cpp/ECTag.cpp
771
++++ b/src/libs/ec/cpp/ECTag.cpp
772
+@@ -1002,6 +1002,13 @@ void CECTag::DebugPrint(int level, bool print_empty) const
773
+ s2 = CFormat(wxT("%.1f")) % GetDoubleData(); break;
774
+ case EC_TAGTYPE_HASH16:
775
+ s2 = GetMD4Data().Encode(); break;
776
++ case EC_TAGTYPE_UINT128:
777
++ // Using any non-inline function from UInt128.h would break linkage
778
++ // of remote apps otherwise not using CUInt128. So just fall through
779
++ // and display the value as a byte-stream. Since the value is sent
780
++ // big-endian on the network, the visual result is correct, except
781
++ // for the intervening spaces...
782
++ //s2 = GetInt128Data().ToHexString(); break;
783
+ case EC_TAGTYPE_CUSTOM:
784
+ if (m_dataLen == 0) {
785
+ s2 = wxT("empty");
786
+diff --git a/src/libs/ec/cpp/ECTag.h b/src/libs/ec/cpp/ECTag.h
787
+index 70308f9..5ca4d56 100644
788
+--- a/src/libs/ec/cpp/ECTag.h
789
++++ b/src/libs/ec/cpp/ECTag.h
790
+@@ -41,6 +41,11 @@
791
+ /* aMule/libcommon generic includes */
792
+ #include "../../../MD4Hash.h" // Needed for CMD4Hash
793
+
794
++namespace Kademlia {
795
++ class CUInt128;
796
++}
797
++using Kademlia::CUInt128;
798
++
799
+ /* EC specific includes */
800
+ #include "ECCodes.h" // Needed for EC types
801
+ #include "ECTagTypes.h" // Needed for TagTypes
802
+@@ -108,6 +113,7 @@ class CECTag {
803
+ CECTag(ec_tagname_t name, const std::string& data);
804
+ CECTag(ec_tagname_t name, const EC_IPv4_t& data);
805
+ CECTag(ec_tagname_t name, const CMD4Hash& data);
806
++ CECTag(ec_tagname_t name, const CUInt128& data);
807
+ #ifdef USE_WX_EXTENSIONS
808
+ CECTag(ec_tagname_t name, const wxString& data);
809
+ CECTag(ec_tagname_t name, const wxChar* data);
810
+@@ -123,6 +129,7 @@ class CECTag {
811
+ bool AddTag(const CECTag& tag, CValueMap* valuemap = NULL);
812
+ void AddTag(ec_tagname_t name, uint64_t data, CValueMap* valuemap = NULL);
813
+ void AddTag(ec_tagname_t name, const CMD4Hash& data, CValueMap* valuemap);
814
++ void AddTag(ec_tagname_t name, const CUInt128& data, CValueMap* valuemap);
815
+ #ifdef USE_WX_EXTENSIONS
816
+ void AddTag(ec_tagname_t name, const wxString& data, CValueMap* valuemap = NULL);
817
+ #endif
818
+@@ -157,6 +164,7 @@ class CECTag {
819
+
820
+ EC_IPv4_t GetIPv4Data() const;
821
+ CMD4Hash GetMD4Data() const;
822
++ CUInt128 GetInt128Data() const;
823
+
824
+ void DebugPrint(int level, bool print_empty) const;
825
+ void swap(CECTag & t);
826
+@@ -173,6 +181,7 @@ class CECTag {
827
+ double AssignIfExist(ec_tagname_t tagname, double *target) const;
828
+ float AssignIfExist(ec_tagname_t tagname, float *target) const;
829
+ CMD4Hash AssignIfExist(ec_tagname_t tagname, CMD4Hash *target) const;
830
++ CUInt128 AssignIfExist(ec_tagname_t tagname, CUInt128 *target) const;
831
+ std::string AssignIfExist(ec_tagname_t tagname, std::string *target) const;
832
+ #ifdef USE_WX_EXTENSIONS
833
+ wxString AssignIfExist(ec_tagname_t tagname, wxString *target) const;
834
+@@ -189,6 +198,7 @@ class CECTag {
835
+ bool AssignIfExist(ec_tagname_t tagname, double &target) const;
836
+ bool AssignIfExist(ec_tagname_t tagname, float &target) const;
837
+ bool AssignIfExist(ec_tagname_t tagname, CMD4Hash &target) const;
838
++ bool AssignIfExist(ec_tagname_t tagname, CUInt128 &target) const;
839
+ bool AssignIfExist(ec_tagname_t tagname, std::string &target) const;
840
+ #ifdef USE_WX_EXTENSIONS
841
+ bool AssignIfExist(ec_tagname_t tagname, wxString &target) const;
842
+diff --git a/src/libs/ec/cpp/ECTagTypes.h b/src/libs/ec/cpp/ECTagTypes.h
843
+index 3414e65..75c3a3d 100644
844
+--- a/src/libs/ec/cpp/ECTagTypes.h
845
++++ b/src/libs/ec/cpp/ECTagTypes.h
846
+@@ -37,7 +37,8 @@ enum ECTagTypes {
847
+ EC_TAGTYPE_STRING = 6,
848
+ EC_TAGTYPE_DOUBLE = 7,
849
+ EC_TAGTYPE_IPV4 = 8,
850
+- EC_TAGTYPE_HASH16 = 9
851
++ EC_TAGTYPE_HASH16 = 9,
852
++ EC_TAGTYPE_UINT128 = 10
853
+ };
854
+
855
+ #ifdef DEBUG_EC_IMPLEMENTATION
856
+@@ -55,6 +56,7 @@ wxString GetDebugNameECTagTypes(uint8 arg)
857
+ case 7: return wxT("EC_TAGTYPE_DOUBLE");
858
+ case 8: return wxT("EC_TAGTYPE_IPV4");
859
+ case 9: return wxT("EC_TAGTYPE_HASH16");
860
++ case 10: return wxT("EC_TAGTYPE_UINT128");
861
+ default: return CFormat(wxT("unknown %d 0x%x")) % arg % arg;
862
+ }
863
+ }
864
+diff --git a/src/libs/ec/cpp/ECUInt128.cpp b/src/libs/ec/cpp/ECUInt128.cpp
865
+new file mode 100644
866
+index 0000000..506f30e
867
+--- /dev/null
868
++++ b/src/libs/ec/cpp/ECUInt128.cpp
869
+@@ -0,0 +1,91 @@
870
++//
871
++// This file is part of the aMule Project.
872
++//
873
++// Copyright (c) 2015 aMule Team ( admin@amule.org / http://www.amule.org )
874
++//
875
++// Any parts of this program derived from the xMule, lMule or eMule project,
876
++// or contributed by third-party developers are copyrighted by their
877
++// respective authors.
878
++//
879
++// This program is free software; you can redistribute it and/or modify
880
++// it under the terms of the GNU General Public License as published by
881
++// the Free Software Foundation; either version 2 of the License, or
882
++// (at your option) any later version.
883
++//
884
++// This program is distributed in the hope that it will be useful,
885
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
886
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
887
++// GNU General Public License for more details.
888
++//
889
++// You should have received a copy of the GNU General Public License
890
++// along with this program; if not, write to the Free Software
891
++// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
892
++//
893
++
894
++
895
++// Implementation of these functions cannot be in ECTag.cpp, because here we
896
++// use non-inline member functions of CUInt128. This way these functions are
897
++// only needed if we actually use the CUInt128 class, and will not cause
898
++// linker errors for apps like aMuleCmd, which don't use CUInt128.
899
++//
900
++// The other working possibility would be to make all these functions inline
901
++// members of CECTag, but that would clutter the header too much.
902
++
903
++
904
++#include "ECTag.h"
905
++#include "ECSpecialTags.h"
906
++#include "../../../kademlia/utils/UInt128.h"
907
++
908
++
909
++CECTag::CECTag(ec_tagname_t tagname, const CUInt128& data)
910
++ : m_tagName(tagname),
911
++ m_dataType(EC_TAGTYPE_UINT128),
912
++ m_dataLen(16)
913
++{
914
++ NewData();
915
++ data.ToByteArray(reinterpret_cast<uint8_t *>(m_tagData));
916
++}
917
++
918
++void CECTag::AddTag(ec_tagname_t name, const CUInt128& data, CValueMap *valuemap)
919
++{
920
++ if (valuemap) {
921
++ valuemap->CreateTag(name, data, this);
922
++ } else {
923
++ AddTag(CECTag(name, data));
924
++ }
925
++}
926
++
927
++CUInt128 CECTag::GetInt128Data() const
928
++{
929
++ if (m_dataType != EC_TAGTYPE_UINT128) {
930
++ EC_ASSERT(m_dataType == EC_TAGTYPE_UNKNOWN);
931
++ return CUInt128(false);
932
++ }
933
++
934
++ EC_ASSERT(m_tagData != NULL);
935
++
936
++ if (m_tagData) {
937
++ return CUInt128(reinterpret_cast<const uint8_t *>(m_tagData));
938
++ } else {
939
++ return CUInt128(false);
940
++ }
941
++}
942
++
943
++CUInt128 CECTag::AssignIfExist(ec_tagname_t tagname, CUInt128 *target) const
944
++{
945
++ if (AssignIfExist(tagname, *target)) {
946
++ return *target;
947
++ } else {
948
++ return CUInt128(false);
949
++ }
950
++}
951
++
952
++bool CECTag::AssignIfExist(ec_tagname_t tagname, CUInt128 &target) const
953
++{
954
++ const CECTag *tag = GetTagByName(tagname);
955
++ if (tag) {
956
++ target = tag->GetInt128Data();
957
++ return true;
958
++ }
959
++ return false;
960
++}
961
+diff --git a/src/libs/ec/cpp/Makefile.am b/src/libs/ec/cpp/Makefile.am
962
+index 219d600..3bc30c6 100644
963
+--- a/src/libs/ec/cpp/Makefile.am
964
++++ b/src/libs/ec/cpp/Makefile.am
965
+@@ -14,7 +14,8 @@ libec_a_SOURCES = \
966
+ ECSocket.cpp \
967
+ ECMuleSocket.cpp \
968
+ RemoteConnect.cpp \
969
+- ECSpecialTags.cpp
970
++ ECSpecialTags.cpp \
971
++ ECUInt128.cpp
972
+
973
+ noinst_HEADERS = \
974
+ ECTag.h \
975
+diff --git a/src/libs/ec/java/ECCodes.java b/src/libs/ec/java/ECCodes.java
976
+index 7851959..ccf41e5 100644
977
+--- a/src/libs/ec/java/ECCodes.java
978
++++ b/src/libs/ec/java/ECCodes.java
979
+@@ -129,6 +129,7 @@ public final static short EC_TAG_CAN_ZLIB = 0x000C;
980
+ public final static short EC_TAG_CAN_UTF8_NUMBERS = 0x000D;
981
+ public final static short EC_TAG_CAN_NOTIFY = 0x000E;
982
+ public final static short EC_TAG_ECID = 0x000F;
983
++public final static short EC_TAG_KAD_ID = 0x0010;
984
+ public final static short EC_TAG_CLIENT_NAME = 0x0100;
985
+ public final static short EC_TAG_CLIENT_VERSION = 0x0101;
986
+ public final static short EC_TAG_CLIENT_MOD = 0x0102;
987
+diff --git a/src/libs/ec/java/ECTagTypes.java b/src/libs/ec/java/ECTagTypes.java
988
+index a0ccba9..eca3b41 100644
989
+--- a/src/libs/ec/java/ECTagTypes.java
990
++++ b/src/libs/ec/java/ECTagTypes.java
991
+@@ -36,5 +36,6 @@ public final static byte EC_TAGTYPE_STRING = 6;
992
+ public final static byte EC_TAGTYPE_DOUBLE = 7;
993
+ public final static byte EC_TAGTYPE_IPV4 = 8;
994
+ public final static byte EC_TAGTYPE_HASH16 = 9;
995
++public final static byte EC_TAGTYPE_UINT128 = 10;
996
+
997
+ }
998
+diff --git a/src/webserver/src/WebInterface.cpp b/src/webserver/src/WebInterface.cpp
999
+index ad3c63a..535f224 100644
1000
+--- a/src/webserver/src/WebInterface.cpp
1001
++++ b/src/webserver/src/WebInterface.cpp
1002
+@@ -409,9 +409,6 @@ namespace MuleNotify
1003
+ CMuleGUIEvent evt(ntf.Clone());
1004
+ wxPostEvent(wxTheApp, evt);
1005
+ }
1006
+-
1007
+- void UDPSocketSend(class CMuleUDPSocket *) {}
1008
+- void UDPSocketReceive(class CMuleUDPSocket *) {}
1009
+ }
1010
+
1011
+
1012
+@@ -518,7 +515,7 @@ bool CamulewebApp::GetTemplateDir(const wxString& templateName, wxString& templa
1013
+ }
1014
+ #endif
1015
+
1016
+- dir = GetConfigDir(wxT("remote.conf")) + wxT("webserver");
1017
++ dir = m_configDir + wxT("webserver");
1018
+ if (CheckDirForTemplate(dir, templateName)) {
1019
+ templateDir = dir;
1020
+ m_localTemplate = true;
1021
+@@ -851,7 +848,7 @@ wxString CamulewebApp::SetLocale(const wxString& language)
1022
+ // First look in ~/.aMule/webserver/<template>, but only if a local template was used
1023
+ wxString dir;
1024
+ if (m_localTemplate) {
1025
+- dir = JoinPaths(JoinPaths(JoinPaths(GetConfigDir(), wxT("webserver")), m_TemplateName), wxT("locale"));
1026
++ dir = JoinPaths(JoinPaths(JoinPaths(m_configDir, wxT("webserver")), m_TemplateName), wxT("locale"));
1027
+ DebugShow(wxT("looking for message catalogs in ") + dir + wxT("... "));
1028
+ }
1029
+ if (!m_localTemplate || !DirHasMessageCatalog(dir, lang, domain)) {
1030