[svn-commits] trunk r23984 - /trunk/utils/ael_main.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Mon May 1 12:23:43 MST 2006


Author: russell
Date: Mon May  1 14:23:43 2006
New Revision: 23984

URL: http://svn.digium.com/view/asterisk?rev=23984&view=rev
Log:
make sure non-inlined versions of ast_copy_string and _ast_calloc are available
in the cases where they are needed (issue #7054)

Modified:
    trunk/utils/ael_main.c

Modified: trunk/utils/ael_main.c
URL: http://svn.digium.com/view/asterisk/trunk/utils/ael_main.c?rev=23984&r1=23983&r2=23984&view=diff
==============================================================================
--- trunk/utils/ael_main.c (original)
+++ trunk/utils/ael_main.c Mon May  1 14:23:43 2006
@@ -10,12 +10,22 @@
 #include <errno.h>
 #include <regex.h>
 #include <limits.h>
+
+/* ast_copy_string */
+#define AST_API_MODULE
+#include "asterisk/strings.h"
+
+/* ensure that _ast_calloc works */
+#define AST_API_MODULE 
+#include "asterisk/utils.h"
+
 #include "asterisk/ast_expr.h"
 #include "asterisk/logger.h"
 #include "asterisk/module.h"
 #include "asterisk/channel.h"
 #include "asterisk/app.h"
 #include "asterisk/ael_structs.h"
+
 #define AST_CONFIG_MAX_PATH 255
 
 int conts=0, extens=0, priors=0;
@@ -53,18 +63,6 @@
 	return (struct ast_app*)1; /* so as not to trigger an error */
 }
 
-
-void ast_copy_string(char *dst, const char *src, size_t size)
-{
-        while (*src && size) {
-                *dst++ = *src++;
-                size--;
-        }
-        if (__builtin_expect(!size, 0))
-                dst--;
-        *dst = '\0';
-}
-
 void ast_cli_register_multiple(void)
 {
 	if(!no_comp)



More information about the svn-commits mailing list