[Asterisk-Users] Capi problems
Deti Fliegl
deti at fliegl.de
Tue Jun 15 06:02:37 MST 2004
Dave Cotton schrieb:
> I'm getting this message when I start Asterisk
>
> chan_capi.c:2205 capi_handle_msg: Command.Subcommand = 0x5.0x81
>
> but when I try and recompile I get this
>
> chan_capi.c:60: error:
> `__use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__'
> undeclared here (not in a function)
>
> any help would be greatly appreciated.
Please apply the patch attached to this mail.
Deti
-------------- next part --------------
--- chan_capi.c.orig 2004-06-07 14:40:17.000000000 +0200
+++ chan_capi.c 2004-06-12 19:12:13.000000000 +0200
@@ -57,11 +57,11 @@
static int usecnt;
-static ast_mutex_t usecnt_lock = AST_MUTEX_INITIALIZER;
-static ast_mutex_t iflock = AST_MUTEX_INITIALIZER;
-static ast_mutex_t pipelock = AST_MUTEX_INITIALIZER;
-static ast_mutex_t monlock = AST_MUTEX_INITIALIZER;
-static ast_mutex_t contrlock = AST_MUTEX_INITIALIZER;
+AST_MUTEX_DEFINE_STATIC(usecnt_lock);
+AST_MUTEX_DEFINE_STATIC(iflock);
+AST_MUTEX_DEFINE_STATIC(pipelock);
+AST_MUTEX_DEFINE_STATIC(monlock);
+AST_MUTEX_DEFINE_STATIC(contrlock);
#ifdef CAPI_ULAW
static int capi_capability = AST_FORMAT_ULAW;
@@ -82,8 +82,8 @@
static char capi_send_buffer[AST_CAPI_MAX_B3_BLOCKS * AST_CAPI_MAX_B3_BLOCK_SIZE];
static int capi_send_buffer_handle = 0;
-static ast_mutex_t capi_send_buffer_lock = AST_MUTEX_INITIALIZER;
-static ast_mutex_t capi_put_lock = AST_MUTEX_INITIALIZER;
+AST_MUTEX_DEFINE_STATIC(capi_send_buffer_lock);
+AST_MUTEX_DEFINE_STATIC(capi_put_lock);
char capi_national_prefix[AST_MAX_EXTENSION];
char capi_international_prefix[AST_MAX_EXTENSION];
More information about the asterisk-users
mailing list