Changeset 1463

Show
Ignore:
Timestamp:
12/02/07 16:11:22 (11 months ago)
Author:
common
Message:

nepenthes

  • revert 1461 1462, fix downloadblocklist on big endian
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • nepenthes/trunk/nepenthes-core/src/DownloadManager.cpp

    r1462 r1463  
    2929 
    3030#include <string> 
     31#include <sys/param.h> 
    3132 
    3233#include "DownloadManager.hpp" 
     
    115116 *  
    116117 */ 
    117 //#ifndef BIG_ENDIAN 
    118 //    #define SWAP_ORDER(x) (x) 
    119 //#else 
     118#if BYTE_ORDER == BIG_ENDIAN 
     119      #define SWAP_ORDER(x) (x) 
     120#else 
    120121        #define SWAP_ORDER(x) ( \ 
    121122                ((x & 0xff) << 24) | \ 
     
    123124                ((x & 0xff0000) >> 8 ) | \ 
    124125                ((x & 0xff000000) >> 24 )) 
    125 //#endif 
     126#endif 
    126127 
    127128#define PACKADDR(a, b, c, d) SWAP_ORDER((((uint32_t)(a) << 24) | ((b) << 16) | ((c) << 8) | (d))) 
     
    282283 
    283284        for ( uint32_t i = 0; i < sizeof(m_irLocalRanges) / sizeof(ip_range_t); i++ ) 
    284                 if ( (ulAddress & htonl(m_irLocalRanges[i].m_ulMask)) == htonl(m_irLocalRanges[i].m_ulAddress)
     285                if ( (ulAddress & m_irLocalRanges[i].m_ulMask) == m_irLocalRanges[i].m_ulAddress
    285286                        return true; 
    286287