[Home]

Summary:ASTERISK-01798: CDR MySQL add-on build breaks in Asterisk-1.0
Reporter:houman (houman)Labels:
Date Opened:2004-06-11 04:27:11Date Closed:2011-06-07 14:10:24
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:MySQL CDR add-on does not compile due to an unknown mutex definition. I used the definition in Postgress CDR module and I managed to compile it fine. A patch is attached in the additional info section.

Filename: cdr_addon_mysql.c

****** ADDITIONAL INFORMATION ******

*** cdr_addon_mysql.c.org       2004-06-11 01:09:18.000000000 -0700
--- cdr_addon_mysql.c   2004-06-11 01:07:46.000000000 -0700
***************
*** 47,53 ****
 static int totalrecords = 0;
 static int userfield = 0;

! AST_MUTEX_DEFINE_STATIC(mysql_lock);

 static MYSQL mysql;

--- 47,55 ----
 static int totalrecords = 0;
 static int userfield = 0;

! static ast_mutex_t mysql_lock = AST_MUTEX_INITIALIZER;
!
! /*AST_MUTEX_DEFINE_STATIC(mysql_lock);*/

 static MYSQL mysql;
Comments:By: Olle Johansson (oej) 2004-06-11 07:51:41

Seem like the addon was patched for CVS head. Try downloading an earlier version in the CVS.

By: Brian West (bkw918) 2004-06-12 16:01:12

Either use the version that has

static ast_mutex_t mysql_lock = AST_MUTEX_INITIALIZER;

or patch it... as this was updated for cvs-head.

bkw