aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Linux - Sparc  (Read 1654 times)

Lussarn

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 1
Linux - Sparc
« on: December 01, 2004, 02:01:20 AM »

Hi, I have been trying to get amule to work on linux sparc64. Had a few problems with crashes. Anyway, this is what I have done to make it somewhat work.

otherfunctions.h

Replaced the optimized md4cpy with: (Total crash)
memcpy((void *)dst, (void *)src, 16);

Replaced the optimized md4cmp with: (Don't know if this one was needed)
return memcmp((void *) hash1, (void *) hash2, 16);

Replaced the optimized md4clr with: (Don't know if this one was needed)
memset((void *) hash, 0, 16);

ServerList.cpp

In function CServerList::ServerStats() I have commented out
Code: [Select]
 theApp.serverconnect->SendUDPPacket(packet, ping_server, true);

  ping_server->SetLastDescPingedCount(false);
  if(ping_server->GetLastDescPingedCount() < 2) {
    // eserver 16.45+ supports a new OP_SERVER_DESC_RES answer, if the OP_SERVER_DESC_REQ contains a uint32
    // challenge, the server returns additional info with OP_SERVER_DESC_RES. To properly distinguish the
    // old and new OP_SERVER_DESC_RES answer, the challenge has to be selected carefully. The first 2 bytes
    // of the challenge (in network byte order) MUST NOT be a valid string-len-int16!
    uint32 randomness = 1 + (int) (((float)(0xFFFF))*rand()/(RAND_MAX+1.0));
    uint32 uDescReqChallenge = ((uint32)randomness << 16) + INV_SERV_DESC_LEN; // 0xF0FF = an 'invalid' string length.
    packet = new Packet( OP_SERVER_DESC_REQ,4);
    packet->CopyUInt32ToDataBuffer(ENDIAN_SWAP_32(uDescReqChallenge));
    theApp.uploadqueue->AddUpDataOverheadServer(packet->GetPacketSize());
    theApp.serverconnect->SendUDPPacket(packet, ping_server, true);
 } else {
    ping_server->SetLastDescPingedCount(true);
 }
This one Also totaly crashes the amule, when it send to the socket. I have problems with gdb on amule so I can't post backtraces (No need maybe since I know where it crashes).

Now Amule starts, I can connect.
If I'm not mistaken the servers send their name back to the client, this name is garbled in the serverlist for some reason but doesn't seem to affect the app.
I can also search and download.

Any takers on that ping function?

Thanks for an otherwise very nice application.
Logged