mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 20:51:58 +00:00
add wrapper code to fully encapsulate apr, apr-utils, pcre, and sqlite. fully use switch_ namespace in modules, create our own format and type defines. follow up commit for unix autotools coming soon after this. PLEASE NOTE: you will NEED to do a make megaclean and run configure again after this update (and the following commit) or it will not build.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4494 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -438,9 +438,9 @@ static void js_error(JSContext *cx, const char *message, JSErrorReport *report)
|
||||
static switch_status_t sm_load_file(char *filename)
|
||||
{
|
||||
sm_loadable_module_t *module = NULL;
|
||||
apr_dso_handle_t *dso = NULL;
|
||||
apr_status_t status = SWITCH_STATUS_SUCCESS;
|
||||
apr_dso_handle_sym_t function_handle = NULL;
|
||||
switch_dso_handle_t *dso = NULL;
|
||||
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
||||
switch_dso_handle_sym_t function_handle = NULL;
|
||||
spidermonkey_init_t spidermonkey_init = NULL;
|
||||
const sm_module_interface_t *module_interface = NULL, *mp;
|
||||
|
||||
@@ -450,16 +450,16 @@ static switch_status_t sm_load_file(char *filename)
|
||||
|
||||
assert(filename != NULL);
|
||||
|
||||
status = apr_dso_load(&dso, filename, module_manager.pool);
|
||||
status = switch_dso_load(&dso, filename, module_manager.pool);
|
||||
|
||||
while (loading) {
|
||||
if (status != APR_SUCCESS) {
|
||||
apr_dso_error(dso, derr, sizeof(derr));
|
||||
if (status != SWITCH_STATUS_SUCCESS) {
|
||||
switch_dso_error(dso, derr, sizeof(derr));
|
||||
err = derr;
|
||||
break;
|
||||
}
|
||||
|
||||
status = apr_dso_sym(&function_handle, dso, "spidermonkey_init");
|
||||
status = switch_dso_sym(&function_handle, dso, "spidermonkey_init");
|
||||
spidermonkey_init = (spidermonkey_init_t)(intptr_t) function_handle;
|
||||
|
||||
if (spidermonkey_init == NULL) {
|
||||
|
||||
@@ -153,10 +153,10 @@ static JSBool db_next(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsv
|
||||
int running = 1;
|
||||
while (running < 5000) {
|
||||
int result = switch_core_db_step(dbo->stmt);
|
||||
if (result == SQLITE_ROW) {
|
||||
if (result == SWITCH_CORE_DB_ROW) {
|
||||
*rval = BOOLEAN_TO_JSVAL( JS_TRUE );
|
||||
break;
|
||||
} else if (result == SQLITE_BUSY) {
|
||||
} else if (result == SWITCH_CORE_DB_BUSY) {
|
||||
running++;
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user