Index: funcs/func_realtime.c =================================================================== --- funcs/func_realtime.c (revision 11943) +++ funcs/func_realtime.c (working copy) @@ -42,7 +42,7 @@ #include "asterisk/utils.h" #include "asterisk/app.h" -static char *function_realtime_read(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len) +static int function_realtime_read(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len) { struct ast_variable *var=NULL,*head=NULL; @@ -58,7 +58,7 @@ if (ast_strlen_zero(data)) { ast_log(LOG_WARNING, "Syntax: REALTIME(family|metamatch[|value[|delim1[|delim2]]]) - missing argument!\n"); - return NULL; + return -1; } else AST_STANDARD_APP_ARGS(args, data); @@ -83,13 +83,13 @@ } } else - return NULL; + return -1; ast_copy_string(buf, results, len); - return buf; + return 0; } -static void function_realtime_write(struct ast_channel *chan, char *cmd, char *data, const char *value) +static int function_realtime_write(struct ast_channel *chan, char *cmd, char *data, const char *value) { int res = 0; AST_DECLARE_APP_ARGS(args, @@ -101,7 +101,7 @@ if (ast_strlen_zero(data)) { ast_log(LOG_WARNING, "Syntax: REALTIME(family|metamatch|value|newcol) - missing argument!\n"); - return; + return -1; } else AST_STANDARD_APP_ARGS(args, data); @@ -111,12 +111,9 @@ ast_log(LOG_WARNING, "Failed to update. Check the debug log for possible data repository related entries.\n"); } - return; + return 0; } -#ifndef BUILTIN_FUNC -static -#endif struct ast_custom_function realtime_function = { .name = "REALTIME", .synopsis = "RealTime Read/Write Functions",