mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-14 21:38:34 +00:00
icc changes part 1
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@982 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
14b58205b1
commit
64507e70ca
57 files changed
+1055
-1048
No files matched your search
@@ -40,7 +40,7 @@ $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c $(MODNAME).o $(OBJS)
|
||||
$(CC) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(OBJS) $(LDFLAGS)
|
||||
|
||||
clean:
|
||||
rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ perlxsi.c .perlok
|
||||
rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .perlok
|
||||
|
||||
install:
|
||||
mkdir -p $(PREFIX)/perl
|
||||
|
||||
@@ -29,7 +29,9 @@
|
||||
* mod_perl.c -- Perl
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef __ICC
|
||||
#pragma warning (disable:1419)
|
||||
#endif
|
||||
#ifdef _MSC_VER
|
||||
#include <perlibs.h>
|
||||
#pragma comment(lib, PERL_LIB)
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#ifdef __ICC
|
||||
#pragma warning (disable:1419)
|
||||
#endif
|
||||
#include <EXTERN.h>
|
||||
#include <perl.h>
|
||||
|
||||
EXTERN_C void xs_init (pTHX);
|
||||
|
||||
EXTERN_C void boot_DynaLoader (pTHX_ CV* cv);
|
||||
|
||||
EXTERN_C void
|
||||
xs_init(pTHX)
|
||||
{
|
||||
char *file = __FILE__;
|
||||
dXSUB_SYS;
|
||||
|
||||
/* DynaLoader is a special case */
|
||||
newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file);
|
||||
}
|
||||
@@ -1,4 +1,9 @@
|
||||
#include <switch.h>
|
||||
#ifdef __ICC
|
||||
#pragma warning (disable:1418)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <perlibs.h>
|
||||
@@ -108,9 +113,12 @@ void fs_channel_set_state(struct switch_core_session *session, char *state)
|
||||
switch_channel_set_state(channel, fs_state);
|
||||
}
|
||||
|
||||
int fs_ivr_play_file(struct switch_core_session *session, char *file, char *timer_name_in)
|
||||
int fs_ivr_play_file(struct switch_core_session *session, char *file, char *timer_name)
|
||||
{
|
||||
char *timer_name = switch_strlen_zero(timer_name_in) ? NULL : timer_name;
|
||||
if (switch_strlen_zero(timer_name)) {
|
||||
timer_name = NULL;
|
||||
}
|
||||
|
||||
switch_status status = switch_ivr_play_file(session, NULL, file, timer_name, NULL, NULL, 0);
|
||||
return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
|
||||
}
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
#define HAVE_CURL
|
||||
#endif
|
||||
#define JS_BUFFER_SIZE 131072
|
||||
#ifdef __ICC
|
||||
#pragma warning (disable:310 193 1418)
|
||||
#endif
|
||||
#include <switch.h>
|
||||
|
||||
#include "jstypes.h"
|
||||
@@ -1363,8 +1366,8 @@ static JSBool db_fetch(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, js
|
||||
}
|
||||
for (x = 0; x < colcount; x++) {
|
||||
snprintf(code, sizeof(code), "~_dB_RoW_DaTa_[\"%s\"] = \"%s\"",
|
||||
switch_core_db_column_name(dbo->stmt, x),
|
||||
switch_core_db_column_text(dbo->stmt, x));
|
||||
(char *) switch_core_db_column_name(dbo->stmt, x),
|
||||
(char *) switch_core_db_column_text(dbo->stmt, x));
|
||||
|
||||
eval_some_js(code, dbo->cx, dbo->obj, rval);
|
||||
if (*rval == JS_FALSE) {
|
||||
@@ -1517,7 +1520,7 @@ static JSBool teletone_construct(JSContext *cx, JSObject *obj, uintN argc, jsval
|
||||
(read_codec->implementation->samples_per_second / 50) * read_codec->implementation->number_of_channels,
|
||||
pool) == SWITCH_STATUS_SUCCESS) {
|
||||
tto->timer = &tto->timer_base;
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Timer INIT Success %d\n", ms);
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Timer INIT Success %u\n", ms);
|
||||
} else {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Timer INIT Failed\n");
|
||||
}
|
||||
@@ -1653,9 +1656,7 @@ static JSBool teletone_generate(JSContext *cx, JSObject *obj, uintN argc, jsval
|
||||
}
|
||||
|
||||
if (tto->timer) {
|
||||
int x;
|
||||
|
||||
if ((x = switch_core_timer_next(tto->timer)) < 0) {
|
||||
if (switch_core_timer_next(tto->timer)< 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1850,7 +1851,7 @@ static JSBool js_email(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, js
|
||||
if ( argc > 4) {
|
||||
file = JS_GetStringBytes(JS_ValueToString(cx, argv[4]));
|
||||
}
|
||||
snprintf(filename, 80, "%smail.%ld", SWITCH_GLOBAL_dirs.temp_dir, switch_time_now());
|
||||
snprintf(filename, 80, "%smail.%ld%04x", SWITCH_GLOBAL_dirs.temp_dir, time(NULL), rand() & 0xffff);
|
||||
|
||||
if ((fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0644))) {
|
||||
if (file) {
|
||||
@@ -2051,7 +2052,7 @@ static int env_init(JSContext *cx, JSObject *javascript_object)
|
||||
|
||||
static void js_parse_and_execute(switch_core_session *session, char *input_code)
|
||||
{
|
||||
JSObject *javascript_global_object = NULL, *session_obj = NULL;
|
||||
JSObject *javascript_global_object = NULL;
|
||||
char buf[1024], *script, *arg, *argv[512];
|
||||
int argc = 0, x = 0, y = 0;
|
||||
unsigned int flags = 0;
|
||||
@@ -2067,7 +2068,7 @@ static void js_parse_and_execute(switch_core_session *session, char *input_code)
|
||||
JS_SetGlobalObject(cx, javascript_global_object);
|
||||
|
||||
/* Emaculent conception of session object into the script if one is available */
|
||||
if (session && (session_obj = new_js_session(cx, javascript_global_object, session, &jss, "session", flags))) {
|
||||
if (session && new_js_session(cx, javascript_global_object, session, &jss, "session", flags)) {
|
||||
JS_SetPrivate(cx, javascript_global_object, session);
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user