aboutsummaryrefslogtreecommitdiffstats
path: root/funcs/func_uri.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-02-11 03:14:05 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-02-11 03:14:05 +0000
commit5f90b9bebddfa06f9d08b63e9c48830071480f38 (patch)
tree47f92d29e3216d69801be7bdb5d15fef7aab9a4d /funcs/func_uri.c
parent7acc893dad48c008eaced05bfbedb0d17735bc47 (diff)
build function modules independently (no more pbx_functions.so)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@9469 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs/func_uri.c')
-rw-r--r--funcs/func_uri.c30
1 files changed, 11 insertions, 19 deletions
diff --git a/funcs/func_uri.c b/funcs/func_uri.c
index 122aff375..08fdc5b4d 100644
--- a/funcs/func_uri.c
+++ b/funcs/func_uri.c
@@ -34,17 +34,17 @@
#include "asterisk.h"
-/* ASTERISK_FILE_VERSION(__FILE__, "$Revision$") */
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#include "asterisk/module.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/logger.h"
#include "asterisk/utils.h"
#include "asterisk/app.h"
-#include "asterisk/module.h"
-/*! \brief builtin_function_uriencode: Encode URL according to RFC 2396 */
-static char *builtin_function_uriencode(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
+/*! \brief uriencode: Encode URL according to RFC 2396 */
+static char *uriencode(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
{
char uri[BUFSIZ];
@@ -59,8 +59,8 @@ static char *builtin_function_uriencode(struct ast_channel *chan, char *cmd, cha
return buf;
}
-/*!\brief builtin_function_uridecode: Decode URI according to RFC 2396 */
-static char *builtin_function_uridecode(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
+/*!\brief uridecode: Decode URI according to RFC 2396 */
+static char *uridecode(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
{
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "Syntax: URIDECODE(<data>) - missing argument!\n");
@@ -73,28 +73,21 @@ static char *builtin_function_uridecode(struct ast_channel *chan, char *cmd, cha
return buf;
}
-#ifndef BUILTIN_FUNC
-static
-#endif
-struct ast_custom_function urldecode_function = {
+static struct ast_custom_function urldecode_function = {
.name = "URIDECODE",
.synopsis = "Decodes an URI-encoded string.",
.syntax = "URIDECODE(<data>)",
- .read = builtin_function_uridecode,
+ .read = uridecode,
};
-#ifndef BUILTIN_FUNC
-static
-#endif
-struct ast_custom_function urlencode_function = {
+static struct ast_custom_function urlencode_function = {
.name = "URIENCODE",
.synopsis = "Encodes a string to URI-safe encoding.",
.syntax = "URIENCODE(<data>)",
- .read = builtin_function_uriencode,
+ .read = uriencode,
};
-#ifndef BUILTIN_FUNC
-static char *tdesc = "URI encode/decode functions";
+static char *tdesc = "URI encode/decode dialplan functions";
int unload_module(void)
{
@@ -120,4 +113,3 @@ char *key()
{
return ASTERISK_GPL_KEY;
}
-#endif /* BUILTIN_FUNC */