snowcrash+openpbx wrote:
hi,

compiling with mysql support?

yes.

correctly? well ... dunno about that :-/

here's what i'm doing (atm ...),

% ./bootstrap.sh

% setenv LDFLAGS "-bind_at_load -L/usr/local/ssl/lib
-L/usr/local/mysql/lib/mysql -lmysqlclient_r -L/usr/local/sqlite/lib
-lsqlite3 -L."

% setenv CPPFLAGS "-I/usr/local/ssl/include -I/usr/local/mysql/include
-I/usr/local/sqlite/include -I."

% setenv CFLAGS `echo $CPPFLAGS`

% ./configure \
--prefix=/usr/local/openpbx \
--disable-debug \
--with-openpbx-user=openpbx --with-openpbx-group=openpbx \
--enable-shared --disable-static \
--enable-ssl=yes \
--enable-optimization=yes \
--enable-jabber=no \
--enable-javascript=no \
--enable-odbc=no \
--enable-postgresql=no \
--enable-mysql=yes \
--enable-builtin-sqlite3=no \
--with-sqlite3=/usr/local/sqlite \
--with-sqlite3-incdir=/usr/local/sqlite/include \
--with-sqlite3-libdir=/usr/local/sqlite/lib \
--with-spandsp-includes=/usr/local/spandsp/include \
--with-spandsp-libs=/usr/local/spandsp/lib \
 --enable-zaptel=no \
 --with-cdr_odbc=no \
 --with-cdr_manager=yes \
 --with-cdr_mysql=yes \
 --with-res_config_odbc=no \
 --with-res_config_curl=yes \
 --with-res_config_mysql=yes \
 --with-res_jabber=no \
 --with-res_js=no \
 --with-res_odbc=no \
 --with-res_sqlite=yes \
 --with-man-pages=yes \
 --with-readme=yes \
 --with-license=yes \
 --with-credits=no \
 --with-sgml-docs=yes \
 --enable-iax-trunking=yes \
 --enable-t38=yes
_______________________________________________
Openpbx-dev mailing list
Openpbx-dev@openpbx.org
http://lists.openpbx.org/mailman/listinfo/openpbx-dev

yeah, i think this is the bug i ran across when trying to compile in MySQL support.... The two attached patches MAY help.
Index: res/res_config_mysql.c
===================================================================
--- res/res_config_mysql.c      (revision 2467)
+++ res/res_config_mysql.c      (working copy)
@@ -503,7 +503,7 @@
                opbx_verbose("MySQL RealTime unloaded.\n");
        }
 
-       opbx_module_user_hangup_all();
+       STANDARD_HANGUP_LOCALUSERS;
 
        /* Unlock so something else can destroy the lock. */
        opbx_mutex_unlock(&mysql_lock);
Index: apps/app_sql_mysql.c
===================================================================
--- apps/app_sql_mysql.c        (revision 2467)
+++ apps/app_sql_mysql.c        (working copy)
@@ -376,7 +376,7 @@
 
 static int MYSQL_exec(struct opbx_channel *chan, void *data)
 {
-       struct opbx_module_user *u;
+       struct localuser *u;
        int result;
        char sresult[10];
 
@@ -389,7 +389,7 @@
                return -1;
        }
 
-       u = opbx_module_user_add(chan);
+       LOCAL_USER_ADD(u);
        result=0;
 
        opbx_mutex_lock(&_mysql_mutex);
@@ -411,7 +411,7 @@
                
        opbx_mutex_unlock(&_mysql_mutex);
 
-       opbx_module_user_remove(u);
+       LOCAL_USER_REMOVE(u);
        snprintf(sresult, sizeof(sresult), "%d", result);
        pbx_builtin_setvar_helper(chan, "MYSQL_STATUS", sresult);
        return 0;
@@ -419,7 +419,7 @@
 
 int unload_module(void)
 {
-       opbx_module_user_hangup_all();
+       STANDARD_HANGUP_LOCALUSERS;
        return opbx_unregister_application(app);
 }
 
_______________________________________________
Openpbx-dev mailing list
Openpbx-dev@openpbx.org
http://lists.openpbx.org/mailman/listinfo/openpbx-dev

Reply via email to