Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
8b57411b
提交
8b57411b
authored
3月 01, 2014
作者:
Peter Olsson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-6290 --resolve
上级
ef278822
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
11 行增加
和
15 行删除
+11
-15
mod_v8.cpp
src/mod/languages/mod_v8/mod_v8.cpp
+0
-5
fscoredb.cpp
src/mod/languages/mod_v8/src/fscoredb.cpp
+2
-1
fscurl.cpp
src/mod/languages/mod_v8/src/fscurl.cpp
+1
-1
fssession.cpp
src/mod/languages/mod_v8/src/fssession.cpp
+7
-7
fsteletone.cpp
src/mod/languages/mod_v8/src/fsteletone.cpp
+1
-1
没有找到文件。
src/mod/languages/mod_v8/mod_v8.cpp
浏览文件 @
8b57411b
...
@@ -179,11 +179,6 @@ static switch_status_t v8_mod_load_file(const char *filename)
...
@@ -179,11 +179,6 @@ static switch_status_t v8_mod_load_file(const char *filename)
v8_mod_init
=
(
v8_mod_init_t
)
(
intptr_t
)
function_handle
;
v8_mod_init
=
(
v8_mod_init_t
)
(
intptr_t
)
function_handle
;
if
(
v8_mod_init
==
NULL
)
{
err
=
"Cannot Load"
;
goto
err
;
}
if
(
v8_mod_init
(
&
module_interface
)
!=
SWITCH_STATUS_SUCCESS
)
{
if
(
v8_mod_init
(
&
module_interface
)
!=
SWITCH_STATUS_SUCCESS
)
{
err
=
"Module load routine returned an error"
;
err
=
"Module load routine returned an error"
;
goto
err
;
goto
err
;
...
...
src/mod/languages/mod_v8/src/fscoredb.cpp
浏览文件 @
8b57411b
...
@@ -101,13 +101,14 @@ void *FSCoreDB::Construct(const v8::FunctionCallbackInfo<Value>& info)
...
@@ -101,13 +101,14 @@ void *FSCoreDB::Construct(const v8::FunctionCallbackInfo<Value>& info)
int
FSCoreDB
::
Callback
(
void
*
pArg
,
int
argc
,
char
**
argv
,
char
**
columnNames
)
int
FSCoreDB
::
Callback
(
void
*
pArg
,
int
argc
,
char
**
argv
,
char
**
columnNames
)
{
{
FSCoreDB
*
dbo
=
static_cast
<
FSCoreDB
*>
(
pArg
);
FSCoreDB
*
dbo
=
static_cast
<
FSCoreDB
*>
(
pArg
);
HandleScope
handle_scope
(
dbo
->
GetIsolate
());
int
x
=
0
;
int
x
=
0
;
if
(
!
dbo
)
{
if
(
!
dbo
)
{
return
0
;
return
0
;
}
}
HandleScope
handle_scope
(
dbo
->
GetIsolate
());
if
(
dbo
->
_callback
.
IsEmpty
())
{
if
(
dbo
->
_callback
.
IsEmpty
())
{
dbo
->
GetIsolate
()
->
ThrowException
(
String
::
NewFromUtf8
(
dbo
->
GetIsolate
(),
"No callback specified"
));
dbo
->
GetIsolate
()
->
ThrowException
(
String
::
NewFromUtf8
(
dbo
->
GetIsolate
(),
"No callback specified"
));
return
0
;
return
0
;
...
...
src/mod/languages/mod_v8/src/fscurl.cpp
浏览文件 @
8b57411b
...
@@ -60,7 +60,6 @@ string FSCURL::GetJSClassName()
...
@@ -60,7 +60,6 @@ string FSCURL::GetJSClassName()
size_t
FSCURL
::
FileCallback
(
void
*
ptr
,
size_t
size
,
size_t
nmemb
,
void
*
data
)
size_t
FSCURL
::
FileCallback
(
void
*
ptr
,
size_t
size
,
size_t
nmemb
,
void
*
data
)
{
{
FSCURL
*
obj
=
static_cast
<
FSCURL
*>
(
data
);
FSCURL
*
obj
=
static_cast
<
FSCURL
*>
(
data
);
HandleScope
handle_scope
(
obj
->
GetIsolate
());
register
unsigned
int
realsize
=
(
unsigned
int
)
(
size
*
nmemb
);
register
unsigned
int
realsize
=
(
unsigned
int
)
(
size
*
nmemb
);
uint32_t
argc
=
0
;
uint32_t
argc
=
0
;
Handle
<
Value
>
argv
[
4
];
Handle
<
Value
>
argv
[
4
];
...
@@ -69,6 +68,7 @@ size_t FSCURL::FileCallback(void *ptr, size_t size, size_t nmemb, void *data)
...
@@ -69,6 +68,7 @@ size_t FSCURL::FileCallback(void *ptr, size_t size, size_t nmemb, void *data)
return
0
;
return
0
;
}
}
HandleScope
handle_scope
(
obj
->
GetIsolate
());
Handle
<
Function
>
func
;
Handle
<
Function
>
func
;
if
(
!
obj
->
_function
.
IsEmpty
())
{
if
(
!
obj
->
_function
.
IsEmpty
())
{
...
...
src/mod/languages/mod_v8/src/fssession.cpp
浏览文件 @
8b57411b
...
@@ -694,6 +694,10 @@ JS_SESSION_FUNCTION_IMPL(SayPhrase)
...
@@ -694,6 +694,10 @@ JS_SESSION_FUNCTION_IMPL(SayPhrase)
bool
FSSession
::
CheckHangupHook
(
FSSession
*
obj
,
bool
*
ret
)
bool
FSSession
::
CheckHangupHook
(
FSSession
*
obj
,
bool
*
ret
)
{
{
if
(
!
obj
)
{
return
true
;
}
Isolate
*
isolate
=
obj
->
GetIsolate
();
Isolate
*
isolate
=
obj
->
GetIsolate
();
HandleScope
handle_scope
(
isolate
);
HandleScope
handle_scope
(
isolate
);
Handle
<
Value
>
argv
[
2
];
Handle
<
Value
>
argv
[
2
];
...
@@ -701,7 +705,7 @@ bool FSSession::CheckHangupHook(FSSession *obj, bool *ret)
...
@@ -701,7 +705,7 @@ bool FSSession::CheckHangupHook(FSSession *obj, bool *ret)
bool
res
=
true
;
bool
res
=
true
;
string
resp
;
string
resp
;
if
(
obj
&&
!
obj
->
_check_state
&&
!
obj
->
_on_hangup
.
IsEmpty
()
&&
(
obj
->
_hook_state
==
CS_HANGUP
||
obj
->
_hook_state
==
CS_ROUTING
))
{
if
(
!
obj
->
_check_state
&&
!
obj
->
_on_hangup
.
IsEmpty
()
&&
(
obj
->
_hook_state
==
CS_HANGUP
||
obj
->
_hook_state
==
CS_ROUTING
))
{
obj
->
_check_state
++
;
obj
->
_check_state
++
;
argv
[
argc
++
]
=
Local
<
Object
>::
New
(
obj
->
GetOwner
()
->
GetIsolate
(),
obj
->
GetJavaScriptObject
());
argv
[
argc
++
]
=
Local
<
Object
>::
New
(
obj
->
GetOwner
()
->
GetIsolate
(),
obj
->
GetJavaScriptObject
());
...
@@ -1499,18 +1503,14 @@ JS_SESSION_GET_PROPERTY_IMPL(GetProperty)
...
@@ -1499,18 +1503,14 @@ JS_SESSION_GET_PROPERTY_IMPL(GetProperty)
if
(
!
strcmp
(
prop
,
"cause"
))
{
if
(
!
strcmp
(
prop
,
"cause"
))
{
if
(
channel
)
{
if
(
channel
)
{
info
.
GetReturnValue
().
Set
(
String
::
NewFromUtf8
(
info
.
GetIsolate
(),
switch_channel_cause2str
(
switch_channel_get_cause
(
channel
))));
info
.
GetReturnValue
().
Set
(
String
::
NewFromUtf8
(
info
.
GetIsolate
(),
switch_channel_cause2str
(
switch_channel_get_cause
(
channel
))));
}
else
if
(
this
)
{
info
.
GetReturnValue
().
Set
(
String
::
NewFromUtf8
(
info
.
GetIsolate
(),
switch_channel_cause2str
(
this
->
_cause
)));
}
else
{
}
else
{
info
.
GetReturnValue
().
Set
(
String
::
NewFromUtf8
(
info
.
GetIsolate
(),
""
));
info
.
GetReturnValue
().
Set
(
String
::
NewFromUtf8
(
info
.
GetIsolate
(),
switch_channel_cause2str
(
this
->
_cause
)
));
}
}
}
else
if
(
!
strcmp
(
prop
,
"causecode"
))
{
}
else
if
(
!
strcmp
(
prop
,
"causecode"
))
{
if
(
channel
)
{
if
(
channel
)
{
info
.
GetReturnValue
().
Set
(
Integer
::
New
(
info
.
GetIsolate
(),
switch_channel_get_cause
(
channel
)));
info
.
GetReturnValue
().
Set
(
Integer
::
New
(
info
.
GetIsolate
(),
switch_channel_get_cause
(
channel
)));
}
else
if
(
this
)
{
info
.
GetReturnValue
().
Set
(
Integer
::
New
(
info
.
GetIsolate
(),
this
->
_cause
));
}
else
{
}
else
{
info
.
GetReturnValue
().
Set
(
Integer
::
New
(
info
.
GetIsolate
(),
0
));
info
.
GetReturnValue
().
Set
(
Integer
::
New
(
info
.
GetIsolate
(),
this
->
_cause
));
}
}
}
else
if
(
!
strcmp
(
prop
,
"name"
))
{
}
else
if
(
!
strcmp
(
prop
,
"name"
))
{
info
.
GetReturnValue
().
Set
(
String
::
NewFromUtf8
(
info
.
GetIsolate
(),
switch_channel_get_name
(
channel
)));
info
.
GetReturnValue
().
Set
(
String
::
NewFromUtf8
(
info
.
GetIsolate
(),
switch_channel_get_name
(
channel
)));
...
...
src/mod/languages/mod_v8/src/fsteletone.cpp
浏览文件 @
8b57411b
...
@@ -304,7 +304,7 @@ JS_TELETONE_FUNCTION_IMPL(Generate)
...
@@ -304,7 +304,7 @@ JS_TELETONE_FUNCTION_IMPL(Generate)
break
;
break
;
}
}
}
}
if
((
write_frame
.
datalen
=
(
uint32_t
)
switch_buffer_read_loop
(
_audio_buffer
,
if
(
!
_audio_buffer
||
(
write_frame
.
datalen
=
(
uint32_t
)
switch_buffer_read_loop
(
_audio_buffer
,
fdata
,
write_frame
.
codec
->
implementation
->
decoded_bytes_per_packet
))
<=
0
)
{
fdata
,
write_frame
.
codec
->
implementation
->
decoded_bytes_per_packet
))
<=
0
)
{
break
;
break
;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论