Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
fa1d773a
提交
fa1d773a
authored
6月 20, 2013
作者:
Giovanni Maruzzelli
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-4821 fixed core dump when received sms in UCS2 after having sent sms in UCS2
上级
02c329da
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
24 行增加
和
5 行删除
+24
-5
gsmopen_protocol.cpp
src/mod/endpoints/mod_gsmopen/gsmopen_protocol.cpp
+17
-4
mod_gsmopen.cpp
src/mod/endpoints/mod_gsmopen/mod_gsmopen.cpp
+7
-1
没有找到文件。
src/mod/endpoints/mod_gsmopen/gsmopen_protocol.cpp
浏览文件 @
fa1d773a
...
@@ -1736,7 +1736,13 @@ int gsmopen_serial_read_AT(private_t *tech_pvt, int look_for_ack, int timeout_us
...
@@ -1736,7 +1736,13 @@ int gsmopen_serial_read_AT(private_t *tech_pvt, int look_for_ack, int timeout_us
//Timestamp servicecentretimestamp;
//Timestamp servicecentretimestamp;
//Address sender_recipient_address;
//Address sender_recipient_address;
sms
=
SMSMessage
::
decode
(
tech_pvt
->
line_array
.
result
[
i
]);
// dataCodingScheme = 8 , text=ciao 123 belè новости לק ראת ﺎﻠﺠﻤﻋﺓ 人大
try
{
sms
=
SMSMessage
::
decode
(
tech_pvt
->
line_array
.
result
[
i
]);
// dataCodingScheme = 8 , text=ciao 123 belè новости לק ראת ﺎﻠﺠﻤﻋﺓ 人大
}
catch
(...)
{
ERRORA
(
"GsmException
\n
"
,
GSMOPEN_P_LOG
);
return
-
1
;
}
DEBUGA_GSMOPEN
(
"SMS=
\n
%s
\n
"
,
GSMOPEN_P_LOG
,
sms
->
toString
().
c_str
());
DEBUGA_GSMOPEN
(
"SMS=
\n
%s
\n
"
,
GSMOPEN_P_LOG
,
sms
->
toString
().
c_str
());
...
@@ -1775,8 +1781,9 @@ int gsmopen_serial_read_AT(private_t *tech_pvt, int look_for_ack, int timeout_us
...
@@ -1775,8 +1781,9 @@ int gsmopen_serial_read_AT(private_t *tech_pvt, int look_for_ack, int timeout_us
//sender_recipient_address = sms->address();
//sender_recipient_address = sms->address();
}
}
catch
(
GsmException
&
ge
)
{
catch
(...)
{
ERRORA
(
"GsmException= |||%s|||
\n
"
,
GSMOPEN_P_LOG
,
ge
.
what
());
ERRORA
(
"GsmException
\n
"
,
GSMOPEN_P_LOG
);
return
-
1
;
}
}
...
@@ -2487,7 +2494,7 @@ int utf8_to_iso_8859_1(private_t *tech_pvt, char *utf8_in, size_t inbytesleft, c
...
@@ -2487,7 +2494,7 @@ int utf8_to_iso_8859_1(private_t *tech_pvt, char *utf8_in, size_t inbytesleft, c
iconv_res
=
iconv
(
iconv_format
,
&
inbuf
,
&
inbytesleft
,
&
outbuf
,
&
outbytesleft
);
iconv_res
=
iconv
(
iconv_format
,
&
inbuf
,
&
inbytesleft
,
&
outbuf
,
&
outbytesleft
);
#endif // WIN32
#endif // WIN32
if
(
iconv_res
==
(
size_t
)
-
1
)
{
if
(
iconv_res
==
(
size_t
)
-
1
)
{
DEBUGA_GSMOPEN
(
"cannot translate in iso_8859_1 error: %s
%d
\n
"
,
GSMOPEN_P_LOG
,
strerror
(
errno
),
errno
);
DEBUGA_GSMOPEN
(
"cannot translate in iso_8859_1 error: %s
(errno: %d)
\n
"
,
GSMOPEN_P_LOG
,
strerror
(
errno
),
errno
);
return
-
1
;
return
-
1
;
}
}
DEBUGA_GSMOPEN
DEBUGA_GSMOPEN
...
@@ -2854,10 +2861,16 @@ int gsmopen_sendsms(private_t *tech_pvt, char *dest, char *text)
...
@@ -2854,10 +2861,16 @@ int gsmopen_sendsms(private_t *tech_pvt, char *dest, char *text)
tech_pvt
->
no_ucs2
=
0
;
tech_pvt
->
no_ucs2
=
0
;
tech_pvt
->
sms_pdu_not_supported
=
1
;
tech_pvt
->
sms_pdu_not_supported
=
1
;
ok
=
gsmopen_sendsms
(
tech_pvt
,
dest
,
text
);
ok
=
gsmopen_sendsms
(
tech_pvt
,
dest
,
text
);
tech_pvt
->
no_ucs2
=
1
;
tech_pvt
->
no_ucs2
=
1
;
tech_pvt
->
sms_pdu_not_supported
=
0
;
tech_pvt
->
sms_pdu_not_supported
=
0
;
err
=
gsmopen_serial_write_AT_ack
(
tech_pvt
,
"AT+CMGF=0"
);
if
(
err
)
{
ERRORA
(
"AT+CMGF=0 (set message sending to PDU (as opposed to TEXT) didn't get OK from the phone
\n
"
,
GSMOPEN_P_LOG
);
}
return
ok
;
return
ok
;
}
}
...
...
src/mod/endpoints/mod_gsmopen/mod_gsmopen.cpp
浏览文件 @
fa1d773a
...
@@ -3054,7 +3054,7 @@ int sms_incoming(private_t *tech_pvt)
...
@@ -3054,7 +3054,7 @@ int sms_incoming(private_t *tech_pvt)
return
-
1
;
return
-
1
;
}
}
//DEBUGA_GSMOPEN("received SMS on interface %s: %s\n", GSMOPEN_P_LOG, tech_pvt->name, tech_pvt->sms_message);
//DEBUGA_GSMOPEN("received SMS on interface %s: %s\n", GSMOPEN_P_LOG, tech_pvt->name, tech_pvt->sms_message);
DEBUGA_GSMOPEN
(
"received SMS on interface %s: DATE=%s, SENDER=%s, BODY=
%s|
\n
"
,
GSMOPEN_P_LOG
,
tech_pvt
->
name
,
tech_pvt
->
sms_date
,
tech_pvt
->
sms_sender
,
NOTICA
(
"received SMS on interface %s: DATE=%s, SENDER=%s, BODY=|
%s|
\n
"
,
GSMOPEN_P_LOG
,
tech_pvt
->
name
,
tech_pvt
->
sms_date
,
tech_pvt
->
sms_sender
,
tech_pvt
->
sms_body
);
tech_pvt
->
sms_body
);
#ifdef NOTDEF
#ifdef NOTDEF
if
(
!
zstr
(
tech_pvt
->
session_uuid_str
))
{
if
(
!
zstr
(
tech_pvt
->
session_uuid_str
))
{
...
@@ -3158,6 +3158,12 @@ int sms_incoming(private_t *tech_pvt)
...
@@ -3158,6 +3158,12 @@ int sms_incoming(private_t *tech_pvt)
}
}
/* mod_sms end */
/* mod_sms end */
memset
(
tech_pvt
->
sms_message
,
'\0'
,
sizeof
(
tech_pvt
->
sms_message
));
memset
(
tech_pvt
->
sms_sender
,
'\0'
,
sizeof
(
tech_pvt
->
sms_sender
));
memset
(
tech_pvt
->
sms_date
,
'\0'
,
sizeof
(
tech_pvt
->
sms_date
));
memset
(
tech_pvt
->
sms_body
,
'\0'
,
sizeof
(
tech_pvt
->
sms_body
));
memset
(
tech_pvt
->
sms_datacodingscheme
,
'\0'
,
sizeof
(
tech_pvt
->
sms_datacodingscheme
));
memset
(
tech_pvt
->
sms_servicecentreaddress
,
'\0'
,
sizeof
(
tech_pvt
->
sms_servicecentreaddress
));
//memset(&tech_pvt->chatmessages[which], '\0', sizeof(&tech_pvt->chatmessages[which]) );
//memset(&tech_pvt->chatmessages[which], '\0', sizeof(&tech_pvt->chatmessages[which]) );
//memset(tech_pvt->sms_message, '\0', sizeof(tech_pvt->sms_message));
//memset(tech_pvt->sms_message, '\0', sizeof(tech_pvt->sms_message));
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论