aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-10-16 03:10:33 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-10-16 03:10:33 +0000
commit6b22b400d4134e6db68fbebc25a30f5d2afe9ec4 (patch)
treef889c84b35fcf770b89185d4a367292d66fc5bd7
parent53996e84464de3aa908053e9a480e238b11b86e5 (diff)
More utility cleanups
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6798 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-xinclude/asterisk/utils.h4
-rwxr-xr-xres/Makefile6
-rwxr-xr-xutils.c4
3 files changed, 9 insertions, 5 deletions
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h
index 992bccde0..cd2098d94 100755
--- a/include/asterisk/utils.h
+++ b/include/asterisk/utils.h
@@ -142,8 +142,8 @@ extern struct hostent *ast_gethostbyname(const char *host, struct ast_hostent *h
\brief Produces MD5 hash based on input string */
extern void ast_md5_hash(char *output, char *input);
-extern int ast_base64encode(char *dst, unsigned char *src, int srclen, int max);
-extern int ast_base64decode(unsigned char *dst, char *src, int max);
+extern int ast_base64encode(char *dst, const unsigned char *src, int srclen, int max);
+extern int ast_base64decode(unsigned char *dst, const char *src, int max);
/*! ast_uri_encode
\brief Turn text string to URI-encoded %XX version
diff --git a/res/Makefile b/res/Makefile
index 4386f05db..47e0c4f9b 100755
--- a/res/Makefile
+++ b/res/Makefile
@@ -11,7 +11,7 @@
# the GNU General Public License
#
-MODS=res_adsi.so res_features.so res_crypto.so res_musiconhold.so res_indications.so res_monitor.so \
+MODS=res_adsi.so res_features.so res_musiconhold.so res_indications.so res_monitor.so \
res_agi.so
ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/odbcinst.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/odbcinst.h),)
@@ -23,6 +23,10 @@ ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/odbcinst.h)$(wildcard $(CR
MODS+=res_odbc.so
endif
+ifneq ($(NOCRYPTO),yes)
+ MODS+=res_crypto.so
+endif
+
ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/osp/osp.h),)
MODS+=res_osp.so
OSPLIB=$(CROSS_COMPILE_TARGET)/usr/local/lib/libosptk.a
diff --git a/utils.c b/utils.c
index fd99d581f..0c615cdd3 100755
--- a/utils.c
+++ b/utils.c
@@ -278,7 +278,7 @@ void ast_md5_hash(char *output, char *input)
ptr += sprintf(ptr, "%2.2x", digest[x]);
}
-int ast_base64decode(unsigned char *dst, char *src, int max)
+int ast_base64decode(unsigned char *dst, const char *src, int max)
{
int cnt = 0;
unsigned int byte = 0;
@@ -316,7 +316,7 @@ int ast_base64decode(unsigned char *dst, char *src, int max)
return cnt;
}
-int ast_base64encode(char *dst, unsigned char *src, int srclen, int max)
+int ast_base64encode(char *dst, const unsigned char *src, int srclen, int max)
{
int cnt = 0;
unsigned int byte = 0;