building a fresh co of openpbx r2549, applying your patch as (diff
format, for others' convenience),

% vi openpbx_mysql_patch.diff
=========================================================
diff -ur openpbx-ORIG/apps/app_sql_mysql.c openpbx-svn/apps/app_sql_mysql.c
--- openpbx-ORIG/apps/app_sql_mysql.c   2007-03-08 19:34:23.000000000 -0800
+++ openpbx-svn/apps/app_sql_mysql.c    2007-03-08 19:36:58.000000000 -0800
@@ -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);
 }

diff -ur openpbx-ORIG/res/res_config_mysql.c openpbx-svn/res/res_config_mysql.c
--- openpbx-ORIG/res/res_config_mysql.c 2007-03-08 19:34:31.000000000 -0800
+++ openpbx-svn/res/res_config_mysql.c  2007-03-08 19:37:19.000000000 -0800
@@ -503,7 +503,7 @@
                opbx_verbose("MySQL RealTime unloaded.\n");
        }

-       opbx_module_user_hangup_all();
+       STANDARD_HANGUP_LOCALUSERS;

        /* Unlock so somet
=========================================================

and config'ing as above, a subsequent 'make' seems to make it through
the mysql stuff ok, but fails, now, in the sqlite code,

        ...
        gcc -DHAVE_CONFIG_H -I. -I../include -I../include
-I/usr/local/ssl/include -I/usr/local/  mysql/include -I/usr/local/
sqlite/include -I. -I../sqlite3-embedded/src -I/usr/local/ssl/include
-I/usr/local/  mysql/include -I/usr/local/  sqlite/include -I.
-I/usr/local/spandsp/include -MT res_sqlite_la-res_sqlite.lo -MD -MP
-MF .deps/res_sqlite_la-res_sqlite.Tpo -c res_sqlite.c  -fno-common
-DPIC -o .libs/res_sqlite_la-res_sqlite.o
        In file included from res_sqlite.c:23:
        ../sqlite3-embedded/src/sqliteInt.h:62:19: error: parse.h: No such
file or directory
        In file included from ../sqlite3-embedded/src/sqliteInt.h:241,
                                         from res_sqlite.c:23:
        ../sqlite3-embedded/src/vdbe.h:108:21: error: opcodes.h: No such file
or directory
        res_sqlite.c: In function 'config_sqlite':
        res_sqlite.c:821: warning: pointer targets in passing argument 2 of
'strcmp' differ in signedness
        res_sqlite.c:827: warning: pointer targets in passing argument 2 of
'strcpy' differ in signedness
        make[1]: *** [res_sqlite_la-res_sqlite.lo] Error 1
        make: *** [all-recursive] Error 1
        ...

which is, of course, a different issue.

so, regarding the mysql 'fix' ... i'd documented the issue in a bug
(http://trac.openpbx.org/cgi-bin/trac.cgi/ticket/272) as well.  shall
i add your fix & my notes to the bug? or, can _you_ get the fix into
the commit-pipeline?

thanks for your help.
_______________________________________________
Openpbx-dev mailing list
[email protected]
http://lists.openpbx.org/mailman/listinfo/openpbx-dev

Reply via email to