summaryrefslogtreecommitdiffstats
path: root/crypt.cpp
diff options
context:
space:
mode:
authorSuper User2008-06-14 08:34:50 +0200
committerSuper User2008-06-14 08:34:50 +0200
commitd2b113f2c4f11acfaee1b2e0fd2f03744a89f6d4 (patch)
tree8c9e9504a275a43d5a8785dcca7badf28ada5999 /crypt.cpp
parentfixed dialing-bug when dialing chan_lcr (diff)
downloadlcr-d2b113f2c4f11acfaee1b2e0fd2f03744a89f6d4.tar.gz
lcr-d2b113f2c4f11acfaee1b2e0fd2f03744a89f6d4.tar.xz
lcr-d2b113f2c4f11acfaee1b2e0fd2f03744a89f6d4.zip
changed long to int (64 bit system's compatibilty)
Diffstat (limited to 'crypt.cpp')
-rw-r--r--crypt.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/crypt.cpp b/crypt.cpp
index 80ece0e..b43bcba 100644
--- a/crypt.cpp
+++ b/crypt.cpp
@@ -206,7 +206,7 @@ unsigned char *crypt_key(unsigned char *key, int *binary_len)
/*
* support routine to get cpu speed
*/
-static unsigned long get_bogomips(void)
+static unsigned int get_bogomips(void)
{
FILE *fp;
char buffer[64], *p;
@@ -244,9 +244,9 @@ static unsigned long get_bogomips(void)
/*
* crc 32 stuff
*/
-static unsigned long crc_reflect(unsigned long ref, char ch)
+static unsigned int crc_reflect(unsigned int ref, char ch)
{
- unsigned long value = 0;
+ unsigned int value = 0;
int i;
i = 1;
@@ -260,12 +260,12 @@ static unsigned long crc_reflect(unsigned long ref, char ch)
return(value);
}
-static unsigned long crc32_table[256];
+static unsigned int crc32_table[256];
static int crc_initialized = 0;
void crc_init(void)
{
- unsigned long ulPolynomial = 0x04c11db7;
+ unsigned int ulPolynomial = 0x04c11db7;
int i, j;
i = 0;
@@ -284,9 +284,9 @@ void crc_init(void)
crc_initialized = 1;
}
-unsigned long crc32(unsigned char *data, int len)
+unsigned int crc32(unsigned char *data, int len)
{
- unsigned long crc = 0xffffffff;
+ unsigned int crc = 0xffffffff;
if (!crc_initialized)
FATAL("crc not initialized, exitting...");
@@ -656,7 +656,7 @@ void EndpointAppPBX::cryptman_handler(void)
void EndpointAppPBX::cr_ident(int message, unsigned char *param, int len)
{
unsigned char buf[4], *p;
- unsigned long bogomips = 0, ran;
+ unsigned int bogomips = 0, ran;
int l;
l = CM_SIZEOFINF(CM_INFO_RANDOM);
@@ -1572,7 +1572,7 @@ void EndpointAppPBX::cryptman_timeout(int secs)
*/
int cryptman_encode_bch(unsigned char *data, int len, unsigned char *buf, int buf_len)
{
- unsigned long crc;
+ unsigned int crc;
int overhead = 18;
len--; /* without null-termination */