Official eMule-Board: Current Source Code - Official eMule-Board

Jump to content


  • (27 Pages)
  • +
  • « First
  • 24
  • 25
  • 26
  • 27

Current Source Code

#501 User is offline   fox88 

  • Golden eMule
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 4739
  • Joined: 13-May 07

Posted 10 April 2016 - 11:32 AM

A piece of bad code in CustomAutoComplete.cpp: check for error on closed FILE (it could and probably should fail, even though it does not).
BOOL CCustomAutoComplete::SaveList(LPCTSTR pszFileName)
{
	FILE* fp = _tfsopen(pszFileName, _T("wb"), _SH_DENYWR);
	if (fp == NULL)
		return FALSE;

	// write Unicode byte-order mark 0xFEFF
	fputwc(0xFEFF, fp);

	for (int i = 0; i < m_asList.GetCount(); i++)
		_ftprintf(fp, _T("%s\r\n"), (LPCTSTR)m_asList[i]);
	fclose(fp);
	return !ferror(fp);
}


Leaving exception topics aside, no checking of returned values is done too.
Here is concise version of new code:
BOOL CCustomAutoComplete::SaveList(LPCTSTR pszFileName)
{
	FILE* fp = _tfsopen(pszFileName, _T("wb"), _SH_DENYWR);
	if (fp == NULL)
		return FALSE;
	BOOL ret = (fputwc(0xFEFF, fp) != WEOF); // write Unicode byte-order mark 0xFEFF
	for (int i = 0; ret && i < m_asList.GetCount(); i++)
		ret = (_ftprintf(fp, _T("%s\r\n"), (LPCTSTR)m_asList[i]) > 0);
	return fclose(fp) ? FALSE : ret;
}

This post has been edited by fox88: 04 May 2016 - 06:19 PM

0

#502 User is offline   Some Support 

  • Last eMule
  • PipPipPipPipPipPipPip
  • Group: Yes
  • Posts: 3649
  • Joined: 27-June 03

Posted 10 April 2016 - 12:32 PM

I have created a repository on Github and used VS 2015 with the extension to upload the current code onto it. Looks fine. I'm not familiar with everything yet though, so for now it's a bit of a testing phase. If anything is missing / misconfigured let me know. Otherwise go ahead and commit / propose changes there.

https://github.com/S...pport/eMule.git

As for changes which will be approved in general:
- Major rewrites, feature additions and so on will not get approved quickly. Not because we don't want them but because they take a lot time to review which is scarce at the moment
- Changes should not be only of cosmetic nature, they should fix an actual issue / bug

#503 User is offline   pier4r 

  • Ex falso quodlibet ; Kad is the major concept behind emule.
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 586
  • Joined: 31-March 09

Posted 10 April 2016 - 12:42 PM

View PostSome Support, on 10 April 2016 - 02:32 PM, said:

cut


:thumbup: great, i wish good work to every contributor of patches (and if git is not nice, one can always change hosting, but first and foremost: start!).

For example even having collection of issues directly there makes the "search for hints and fix" way faster.

This post has been edited by pier4r: 10 April 2016 - 12:44 PM

>>> My wiki (ITA) on emule >>>Feature Request (ICS) or SOTN, ClientAnalyzer(fixing fastXs and reask punishment),, EmuleCollectionV2 >>> Emule on old hardware (intel pentium 2 or 3 - via c3 - and so on) with good OS settings and enough ram (256+ mb): great >>>user of: eMule - Xtreme - ZZUL bastard - SharX - SharkX 1.8b5 pierQR - ZZUL-Tra - ZZUL-Tra-TL - kMule - Beba

Extended signature: click.
0

#504 User is offline   Xeus32 

  • Member
  • PipPip
  • Group: Members
  • Posts: 21
  • Joined: 28-May 03

Posted 10 April 2016 - 05:06 PM

View PostSome Support, on 10 April 2016 - 01:32 PM, said:

I have created a repository on Github and used VS 2015 with the extension to upload the current code onto it. Looks fine.


Do you mean that VS2015 continuity is the new proposal official build environment?
0

#505 User is offline   Enig123 

  • Golden eMule
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 519
  • Joined: 22-November 04

Posted 10 April 2016 - 09:10 PM

SS,

There's no definition for the deprecated General DLL version helpers, like AtlGetDllVersion(), AtlGetCommCtrlVersion() and AtlGetShellVersion() with newer Visual Studio / MFC versions. Since you're switching to VS 2015, is there any substitution for these calls in eMule.cpp?

Right now, I just put the corresponding source codes from old lib sources to get it compiled.
0

#506 User is offline   Some Support 

  • Last eMule
  • PipPipPipPipPipPipPip
  • Group: Yes
  • Posts: 3649
  • Joined: 27-June 03

Posted 10 April 2016 - 09:29 PM

We haven't switched to VS2105 to compile. Although it would be a good thing to do, since it's free (the community edition anyway) - but as you noticed eMule needs fixes for it first which takes again time.

#507 User is offline   fox88 

  • Golden eMule
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 4739
  • Joined: 13-May 07

Posted 11 April 2016 - 09:32 PM

View PostSome Support, on 11 April 2016 - 12:29 AM, said:

We haven't switched to VS2105 to compile. Although it would be a good thing to do, since it's free (the community edition anyway) - but as you noticed eMule needs fixes for it first which takes again time.

There is no big deal to switch (I already use VS2015 after VS2013, and for special purposes it now was tweaked to compile in VS2012).

However, I might suggest to use the current code, add virtual destructors and maybe a handful of other fixes, and release that long overdue 0.50b.

Further development and other major and minor fixes could go into the next version.
2

#508 User is offline   guknos 

  • Member
  • PipPip
  • Group: Members
  • Posts: 41
  • Joined: 07-November 15

Posted 12 April 2016 - 08:30 AM

View Postfox88, on 11 April 2016 - 09:32 PM, said:

View PostSome Support, on 11 April 2016 - 12:29 AM, said:

We haven't switched to VS2105 to compile. Although it would be a good thing to do, since it's free (the community edition anyway) - but as you noticed eMule needs fixes for it first which takes again time.

There is no big deal to switch (I already use VS2015 after VS2013, and for special purposes it now was tweaked to compile in VS2012).

However, I might suggest to use the current code, add virtual destructors and maybe a handful of other fixes, and release that long overdue 0.50b.

Further development and other major and minor fixes could go into the next version.

I totally agree fox88.
0

#509 User is offline   Xeus32 

  • Member
  • PipPip
  • Group: Members
  • Posts: 21
  • Joined: 28-May 03

Posted 12 April 2016 - 02:22 PM

View Postfox88, on 11 April 2016 - 10:32 PM, said:

There is no big deal to switch (I already use VS2015 after VS2013, and for special purposes it now was tweaked to compile in VS2012).

However, I might suggest to use the current code, add virtual destructors and maybe a handful of other fixes, and release that long overdue 0.50b.

Further development and other major and minor fixes could go into the next version.


From my point of view is fantastic news.
I have some doubts about make all the changes on this project step (personally I'm using vs2015 comunty).

Now we have a git repository but without any procedure to build the code with vs2008 and/or vs2015.

I know that to build the code we need crypto++, libz, ... But I don't have any idea how to use git submodule .
So we need a base document to allign all the developer on how to setup the new environment.

Fox88 can you shere your experience how to setup the solution for vs2015 or share an archive with your confirmation?

What are the version of your libraries used to build the solution?
0

#510 User is offline   fox88 

  • Golden eMule
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 4739
  • Joined: 13-May 07

Posted 13 April 2016 - 07:57 PM

View Postfox88, on 30 May 2015 - 11:25 PM, said:

SearchList.cpp
void CSearchList::NewSearch(CSearchListCtrl* pWnd, const CStringA& strResultFileType, uint32 nSearchID, ESearchType eSearchType, CString strSearchExpression, bool bMobilMuleSearch) {
strSearchExpression.MakeLower();
...
strSearchExpression.Replace(_T("AND"), _T(""));
strSearchExpression.Replace(_T("OR"), _T(""));
strSearchExpression.Replace(_T("NOT"), _T(""));

Comparison is case-sensitive; and these replacemnts should never work unless first arguments were turned to lower case.

As it appears, non-functioning replacement was good.
Because otherwise search string "NOTepad" would be severely mangled.
The better way to skip those keywords is to add conditions into the loop below:
nPos = 0;
CString strToken = strSearchExpression.Tokenize(_T(".[]()!-'_ "), nPos);
while (!strToken.IsEmpty()){
	if (strToken != "and" && strToken != "or" && strToken != "not") //added
		m_astrSpamCheckCurSearchExp.Add(strToken);
	strToken = strSearchExpression.Tokenize(_T(".[]()!-'_ "), nPos);
}

0

#511 User is offline   fox88 

  • Golden eMule
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 4739
  • Joined: 13-May 07

Posted 23 April 2016 - 06:37 AM

Version 2.0 of miniupnpc library was released.
2

#512 User is offline   fox88 

  • Golden eMule
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 4739
  • Joined: 13-May 07

Posted 03 May 2016 - 06:27 PM

A piece of code in bool CUpDownClient::TryToConnect(bool bIgnoreMaxCon, bool bNoCallbacks, CRuntimeClass* pClassSocket):
// FIXME: We dont know which kadversion the buddy has, so we need to send unencrypted
theApp.clientudp->SendPacket(packet, GetBuddyIP(), GetBuddyPort(), false, NULL, true, 0);


If I get it correctly, version 0.50b drops support for KAD 1.0.
The question is, shall eMule send encrypted packet here?
0

#513 User is offline   pier4r 

  • Ex falso quodlibet ; Kad is the major concept behind emule.
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 586
  • Joined: 31-March 09

Posted 03 May 2016 - 09:17 PM

View PostSome Support, on 10 April 2016 - 02:32 PM, said:

I have created a repository on Github and used VS 2015 with the extension to upload the current code onto it. Looks fine. I'm not familiar with everything yet though, so for now it's a bit of a testing phase. If anything is missing / misconfigured let me know. Otherwise go ahead and commit / propose changes there.

https://github.com/S...pport/eMule.git

As for changes which will be approved in general:
- Major rewrites, feature additions and so on will not get approved quickly. Not because we don't want them but because they take a lot time to review which is scarce at the moment
- Changes should not be only of cosmetic nature, they should fix an actual issue / bug


Should this have more visibility somehow? Maybe a sticky post? I did not find it on the homepage nor in any visible place in the forum.
>>> My wiki (ITA) on emule >>>Feature Request (ICS) or SOTN, ClientAnalyzer(fixing fastXs and reask punishment),, EmuleCollectionV2 >>> Emule on old hardware (intel pentium 2 or 3 - via c3 - and so on) with good OS settings and enough ram (256+ mb): great >>>user of: eMule - Xtreme - ZZUL bastard - SharX - SharkX 1.8b5 pierQR - ZZUL-Tra - ZZUL-Tra-TL - kMule - Beba

Extended signature: click.
2

#514 User is offline   Enig123 

  • Golden eMule
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 519
  • Joined: 22-November 04

Posted 04 May 2016 - 04:40 AM

View Postfox88, on 03 May 2016 - 11:27 AM, said:

A piece of code in bool CUpDownClient::TryToConnect(bool bIgnoreMaxCon, bool bNoCallbacks, CRuntimeClass* pClassSocket):
// FIXME: We dont know which kadversion the buddy has, so we need to send unencrypted
theApp.clientudp->SendPacket(packet, GetBuddyIP(), GetBuddyPort(), false, NULL, true, 0);


If I get it correctly, version 0.50b drops support for KAD 1.0.
The question is, shall eMule send encrypted packet here?


eMule started support kad-obfuscation since 0.49a, which means kad version before 0x07 (KADEMLIA_VERSION7_49a) may not have kad-obfuscation support yet.

This doesn't have direct relationship with KAD 1.0 dropping.
0

#515 User is offline   fox88 

  • Golden eMule
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 4739
  • Joined: 13-May 07

Posted 04 May 2016 - 06:13 PM

View PostEnig123, on 04 May 2016 - 07:40 AM, said:

eMule started support kad-obfuscation since 0.49a, which means kad version before 0x07 (KADEMLIA_VERSION7_49a) may not have kad-obfuscation support yet.

0.47a - 26.01.2006 (KAD 2.0)
0.49a - 11.05.2008 (UDP obfuscation)
When 0.50b appeared, KAD 2.0 was about the same age as obfuscation is now.
I guess, it might be possible to drop unobfuscated KAD already.
1

#516 User is offline   tHeWiZaRdOfDoS 

  • Man, what a bunch of jokers...
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5630
  • Joined: 28-December 02

Posted 04 May 2016 - 09:55 PM

That would go to Kad development again and isn't upon us alone to decide... I remember stumbling across quite a lot of code that would require changes.
While I am on your side (+1 for the drop :angelnot:) I don't think it should be done in a "sub" version. That should be in a major release like 0.51 or even 0.60.
0

#517 User is offline   Enig123 

  • Golden eMule
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 519
  • Joined: 22-November 04

Posted 05 May 2016 - 11:27 PM

A small trivial code fix in UploadDiskIOThread.cpp line 422:
theApp.QueueDebugLogLineEx(LOG_ERROR, _T("ReadCompletetionRoutine: Client has no connected socket, %s"), pOverlappedExStruct->pUploadClientStruct->m_pClient);


should be:
theApp.QueueDebugLogLineEx(LOG_ERROR, _T("ReadCompletetionRoutine: Client has no connected socket, %s"), pOverlappedExStruct->pUploadClientStruct->m_pClient->DbgGetClientInfo(true));

This post has been edited by Enig123: 05 May 2016 - 11:27 PM

0

#518 User is offline   fox88 

  • Golden eMule
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 4739
  • Joined: 13-May 07

Posted 21 May 2016 - 08:09 PM

View PostRiso64Bit, on 10 August 2013 - 04:10 PM, said:

First Runtime Wizard:

runnig FRW under Windows XP SP3 i have some graphical issue( check box not ALLIGNED whit the corresponding TEXT)

Apparently, these graphical issues are correctly aligned multiline checkboxes.
To make it resemble more common single line checkboxes BS_TOP alignment can be used (also top of each control was moved down by 3).
In emule.rc
    CONTROL         "Do you want eMule to manage your download priorities?\n\nTurning this on will allow eMule to make sure downloads with a lot of sources do not interfere with downloads that have few sources...",IDC_DAP,
                    "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE,0,3,315,61
    CONTROL         "Do you want eMule to manage your upload priorities?\n\nTurning this on will allow eMule to boost rare files meaning popular files will be harder for other people to get.\nTurning this off...",IDC_UAP,
                    "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE,0,74,315,66

    CONTROL         "Enable this option if you want to enable protocol obfuscation\n\nIf your ISP tries throttle or block eMule, enabling obfuscation will help to circumvent such restrictions.",IDC_WIZZARDOBFUSCATION,
                    "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE,0,3,317,57

    CONTROL         "Do you want eMule to connect using Safe Connect?\n\nTurning this feature off allows eMule to connect to servers a little faster, but can cause you to get more false lowID connects.",IDC_SAFESERVERCONNECT,
                    "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,8,53,289,45

0

#519 User is offline   Xeus32 

  • Member
  • PipPip
  • Group: Members
  • Posts: 21
  • Joined: 28-May 03

Posted 28 August 2016 - 03:02 PM

Dear all,

I found the times to replace the old Id3Lib with the update version of MediaInfoLib, so eMule can support a wide range of video format.
I have tested mp4, Mkv and Ogg and all work fine.

Now, I'm working to improve the quality because the string output is not alienated with the internal standard.

what do you mean?

This post has been edited by Some Support: 29 August 2016 - 07:16 AM

0

#520 User is offline   emece 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 5
  • Joined: 17-February 16

Posted 07 October 2016 - 02:12 AM

View Postemece, on 17 February 2016 - 09:13 PM, said:

Hi, just installed latest beta from SF with default recommended settings, updated to build 16, but when starting eMule, I get this each time:

"Failed to create Incoming Files directory "C:\Program Files (x86)\eMule\Incoming" - Access denied.";
"Failed to create Incoming Files directory "C:\Program Files (x86)\eMule\Incoming" - System can't find specified file.";
"Failed to create Temporary Files directory "C:\Program Files (x86)\eMule\Temp" - Access denied.";
"Failed to create Temporary Files directory "C:\Program Files (x86)\eMule\Temp" - System can't find specified file.";
"Unknown error while reading emfriends.met: %s - C:\Program Files (x86)\eMule\config\emfriends.met contains an incorrect path.";
"Failed to load known.met file - C:\Program Files (x86)\eMule\config\known.met contains an incorrect path.";
"Failed to load credit file, a new file will be created - C:\Program Files (x86)\eMule\config\clients.met contains an incorrect path.";
"Failed to initialize cryptokeys - secure ident disabled";

Firewall and Upnp are setup ok, but after closing and reopening eMule, config changes weren't saved.

Installed with UAC, running from standard user account. System is Win 7sp1 x64.

The odd thing is default installation setting is to use user account folder (%userprofile%\appdata), but emule is trying to use the programs subfolder.

Sure enough, another computer, another OS (win 8.1 x64), also latest beta, and it's still happening.

07/10/2016 01:18:14: Unknown error while reading emfriends.met: %s - C:\Program Files (x86)\eMule\config\emfriends.met contains an incorrect path.
07/10/2016 01:18:17: Failed to load known.met file - C:\Program Files (x86)\eMule\config\known.met contains an incorrect path.
07/10/2016 01:18:17: Failed to read shared directory "C:\Program Files (x86)\eMule\Incoming\" - O sistema não conseguiu localizar o caminho especificado.
07/10/2016 01:18:17: Found 0 known shared files
07/10/2016 01:18:18: Failed to load credit file, a new file will be created - C:\Program Files (x86)\eMule\config\clients.met contains an incorrect path.
07/10/2016 01:18:20: Failed to initialize cryptokeys - secure ident disabled
07/10/2016 01:18:24: Failed to load server.met! - C:\Program Files (x86)\eMule\config\server.met contains an incorrect path.
07/10/2016 01:18:24: No part files found
07/10/2016 01:18:24: Failed to create part.met file list - C:\Program Files (x86)\eMule\config\downloads.tmp contains an incorrect path.
07/10/2016 01:18:24: eMule Version 0.50b ready
07/10/2016 01:18:25: No new eMule version detected.
07/10/2016 01:18:49: Failed to load known2_64.met file - C:\Program Files (x86)\eMule\config\known2_64.met contains an incorrect path.

Bottom line: emule is ignoring/changing it's own default settings for the OS, without/against user input/wishes, and pointing to a config path it shouldn't, while ignoring/discarding any post-install attempt to fix it.
Permissions and paths are OS default.

This post has been edited by emece: 07 October 2016 - 02:13 AM

0

  • Member Options

  • (27 Pages)
  • +
  • « First
  • 24
  • 25
  • 26
  • 27

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users