summaryrefslogtreecommitdiffstats
path: root/crypt.cpp
diff options
context:
space:
mode:
authorSuper User2007-07-15 12:01:27 +0200
committerSuper User2007-07-15 12:01:27 +0200
commitef3fc1931a2fa82f482d21fb1296735206463d3a (patch)
treec50af579c2acef5b89dba78b4e6b9d4c4701ecc5 /crypt.cpp
parentbackup (diff)
downloadlcr-ef3fc1931a2fa82f482d21fb1296735206463d3a.tar.gz
lcr-ef3fc1931a2fa82f482d21fb1296735206463d3a.tar.xz
lcr-ef3fc1931a2fa82f482d21fb1296735206463d3a.zip
backup
Diffstat (limited to 'crypt.cpp')
-rw-r--r--crypt.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/crypt.cpp b/crypt.cpp
index 2b75792..7868ceb 100644
--- a/crypt.cpp
+++ b/crypt.cpp
@@ -293,10 +293,7 @@ unsigned long crc32(unsigned char *data, int len)
unsigned long crc = 0xffffffff;
if (!crc_initialized)
- {
- PERROR("crc not initialized, exitting...");
- exit(-1);
- }
+ FATAL("crc not initialized, exitting...");
while (len--)
crc = (crc >> 8) ^ crc32_table[(crc & 0xFF) ^ *data++];
@@ -577,8 +574,7 @@ static void *keyengine_child(void *arg)
/* exit process */
apppbx->ea_endpoint->ep_use--;
- memset(args, 0, sizeof(struct auth_args));
- free(args);
+ FREE(args, sizeof(struct auth_args));
amemuse--;
return(NULL);
}
@@ -595,14 +591,7 @@ void EndpointAppPBX::cryptman_keyengine(int job)
return;
}
- arg = (struct auth_args *)calloc(1, sizeof(struct auth_args));
- if (!arg)
- {
- PERROR("failed to alloc memory.\n");
- e_crypt_keyengine_return = -1;
- return;
- }
-
+ arg = (struct auth_args *)MALLOC(sizeof(struct auth_args));
arg->apppbx = this;
arg->job = job;
e_crypt_keyengine_return = 0;
@@ -2044,3 +2033,4 @@ void EndpointAppPBX::encrypt_result(int msg, char *text)
}
}
+