mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 02:26:23 +00:00
More utility cleanups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -142,8 +142,8 @@ extern struct hostent *ast_gethostbyname(const char *host, struct ast_hostent *h
|
|||||||
\brief Produces MD5 hash based on input string */
|
\brief Produces MD5 hash based on input string */
|
||||||
extern void ast_md5_hash(char *output, char *input);
|
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_base64encode(char *dst, const unsigned char *src, int srclen, int max);
|
||||||
extern int ast_base64decode(unsigned char *dst, char *src, int max);
|
extern int ast_base64decode(unsigned char *dst, const char *src, int max);
|
||||||
|
|
||||||
/*! ast_uri_encode
|
/*! ast_uri_encode
|
||||||
\brief Turn text string to URI-encoded %XX version
|
\brief Turn text string to URI-encoded %XX version
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
# the GNU General Public License
|
# 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
|
res_agi.so
|
||||||
|
|
||||||
ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/odbcinst.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/odbcinst.h),)
|
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
|
MODS+=res_odbc.so
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(NOCRYPTO),yes)
|
||||||
|
MODS+=res_crypto.so
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/osp/osp.h),)
|
ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/osp/osp.h),)
|
||||||
MODS+=res_osp.so
|
MODS+=res_osp.so
|
||||||
OSPLIB=$(CROSS_COMPILE_TARGET)/usr/local/lib/libosptk.a
|
OSPLIB=$(CROSS_COMPILE_TARGET)/usr/local/lib/libosptk.a
|
||||||
|
4
utils.c
4
utils.c
@@ -278,7 +278,7 @@ void ast_md5_hash(char *output, char *input)
|
|||||||
ptr += sprintf(ptr, "%2.2x", digest[x]);
|
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;
|
int cnt = 0;
|
||||||
unsigned int byte = 0;
|
unsigned int byte = 0;
|
||||||
@@ -316,7 +316,7 @@ int ast_base64decode(unsigned char *dst, char *src, int max)
|
|||||||
return cnt;
|
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;
|
int cnt = 0;
|
||||||
unsigned int byte = 0;
|
unsigned int byte = 0;
|
||||||
|
Reference in New Issue
Block a user