Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
648ce206
提交
648ce206
authored
11月 06, 2012
作者:
Giovanni Maruzzelli
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-4338 gsmopen: added patch to compile in FreeBSD
上级
a6068d25
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
180 行增加
和
0 行删除
+180
-0
FREEBSD_README.txt
src/mod/endpoints/mod_gsmopen/FREEBSD_README.txt
+9
-0
FREEBSD_patch.diff
src/mod/endpoints/mod_gsmopen/FREEBSD_patch.diff
+171
-0
没有找到文件。
src/mod/endpoints/mod_gsmopen/FREEBSD_README.txt
0 → 100644
浏览文件 @
648ce206
This patch (updated to be applied today) was sent via Jira by royj@yandex.ru, with Jira issue FS-4338.
Apply in this way:
# patch -p6 < FREEBSD_patch.diff
I have not tested it, but it works for him.
Please open another Jira issue if anything wrong.
-giovanni
src/mod/endpoints/mod_gsmopen/FREEBSD_patch.diff
0 → 100644
浏览文件 @
648ce206
diff --git a/src/mod/endpoints/mod_gsmopen/Makefile b/src/mod/endpoints/mod_gsmopen/Makefile
index 18943c8..5324c52 100644
--- a/src/mod/endpoints/mod_gsmopen/Makefile
+++ b/src/mod/endpoints/mod_gsmopen/Makefile
@@ -1,5 +1,5 @@
MODNAME=mod_gsmopen
-LOCAL_CFLAGS += -I../../../../libs/spandsp/src -I../../../..//libs/tiff-4.0.2/libtiff -DGSMOPEN_C_VER=\"`git log -1 --format="%h" gsmopen_protocol.cpp`\" -DMODGSMOPEN_C_VER=\"`git log -1 --format="%h" mod_gsmopen.cpp`\"
+LOCAL_CFLAGS += -I/usr/local/include -I../../../../libs/spandsp/src -I../../../..//libs/tiff-4.0.2/libtiff -DGSMOPEN_C_VER=\"`git log -1 --format="%h" gsmopen_protocol.cpp`\" -DMODGSMOPEN_C_VER=\"`git log -1 --format="%h" mod_gsmopen.cpp`\"
LOCAL_LDFLAGS=-L../../../../libs/spandsp/src -lspandsp -lctb-0.16 -lgsmme
LOCAL_OBJS=gsmopen_protocol.o
include ../../../../build/modmake.rules
diff --git a/src/mod/endpoints/mod_gsmopen/gsmopen_protocol.cpp b/src/mod/endpoints/mod_gsmopen/gsmopen_protocol.cpp
index 5bdda08..73ef93d 100644
--- a/src/mod/endpoints/mod_gsmopen/gsmopen_protocol.cpp
+++ b/src/mod/endpoints/mod_gsmopen/gsmopen_protocol.cpp
@@ -2356,7 +2356,7 @@ int ucs2_to_utf8(private_t *tech_pvt, char *ucs2_in, char *utf8_out, size_t outb
iconv_t iconv_format;
int iconv_res;
char *outbuf;
- char *inbuf;
+ //char *inbuf;
size_t inbytesleft;
int c;
char stringa[5];
@@ -2376,9 +2376,10 @@ int ucs2_to_utf8(private_t *tech_pvt, char *ucs2_in, char *utf8_out, size_t outb
}
outbuf = utf8_out;
- inbuf = converted;
+ const char *inbuf = converted;
- iconv_format = iconv_open("UTF8", "UCS-2BE");
+ //iconv_format = iconv_open("UTF8", "UCS-2BE");
+ iconv_format = iconv_open("UTF-8", "UCS-2BE");
//iconv_format = iconv_open("UTF8", "UCS2");
if (iconv_format == (iconv_t) -1) {
ERRORA("error: %s\n", GSMOPEN_P_LOG, strerror(errno));
@@ -2417,12 +2418,12 @@ int utf8_to_iso_8859_1(private_t *tech_pvt, char *utf8_in, size_t inbytesleft, c
iconv_t iconv_format;
int iconv_res;
char *outbuf;
- char *inbuf;
+ //char *inbuf;
outbuf = iso_8859_1_out;
- inbuf = utf8_in;
+ const char *inbuf = utf8_in;
- iconv_format = iconv_open("ISO_8859-1", "UTF8");
+ iconv_format = iconv_open("ISO_8859-1", "UTF-8");
if (iconv_format == (iconv_t) -1) {
ERRORA("error: %s\n", GSMOPEN_P_LOG, strerror(errno));
return -1;
@@ -2467,7 +2468,7 @@ int iso_8859_1_to_utf8(private_t *tech_pvt, char *iso_8859_1_in, char *utf8_out,
iconv_t iconv_format;
int iconv_res;
char *outbuf;
- char *inbuf;
+ //char *inbuf;
size_t inbytesleft;
//int c;
//char stringa[5];
@@ -2477,9 +2478,9 @@ int iso_8859_1_to_utf8(private_t *tech_pvt, char *iso_8859_1_in, char *utf8_out,
DEBUGA_GSMOPEN("iso_8859_1_in=%s\n", GSMOPEN_P_LOG, iso_8859_1_in);
outbuf = utf8_out;
- inbuf = iso_8859_1_in;
+ const char *inbuf = iso_8859_1_in;
- iconv_format = iconv_open("UTF8", "ISO_8859-1");
+ iconv_format = iconv_open("UTF-8", "ISO_8859-1");
if (iconv_format == (iconv_t) -1) {
ERRORA("error: %s\n", GSMOPEN_P_LOG, strerror(errno));
return -1;
@@ -2514,7 +2515,7 @@ int utf8_to_ucs2(private_t *tech_pvt, char *utf8_in, size_t inbytesleft, char *u
iconv_t iconv_format;
int iconv_res;
char *outbuf;
- char *inbuf;
+ //char *inbuf;
char converted[16000];
int i;
char stringa[16];
@@ -2523,9 +2524,9 @@ int utf8_to_ucs2(private_t *tech_pvt, char *utf8_in, size_t inbytesleft, char *u
memset(converted, '\0', sizeof(converted));
outbuf = converted;
- inbuf = utf8_in;
+ const char *inbuf = utf8_in;
- iconv_format = iconv_open("UCS-2BE", "UTF8");
+ iconv_format = iconv_open("UCS-2BE", "UTF-8");
if (iconv_format == (iconv_t) -1) {
ERRORA("error: %s\n", GSMOPEN_P_LOG, strerror(errno));
return -1;
diff --git a/src/mod/endpoints/mod_gsmopen/libctb-0.16/include/ctb-0.16/linux/serport.h b/src/mod/endpoints/mod_gsmopen/libctb-0.16/include/ctb-0.16/linux/serport.h
index d88528b..f8851cc 100644
--- a/src/mod/endpoints/mod_gsmopen/libctb-0.16/include/ctb-0.16/linux/serport.h
+++ b/src/mod/endpoints/mod_gsmopen/libctb-0.16/include/ctb-0.16/linux/serport.h
@@ -10,7 +10,7 @@
/////////////////////////////////////////////////////////////////////////////
#include "ctb-0.16/serportx.h"
-#include <linux/serial.h>
+//#include <linux/serial.h>
#include <termios.h>
namespace ctb {
@@ -40,7 +40,7 @@ namespace ctb {
need the errors during a active connection, we must save the actual
error numbers in this separate structurs.
*/
- struct serial_icounter_struct save_info, last_info;
+ //struct serial_icounter_struct save_info, last_info;
/*!
\brief adaptor member function, to convert the plattform independent
diff --git a/src/mod/endpoints/mod_gsmopen/libctb-0.16/src/linux/serport.cpp b/src/mod/endpoints/mod_gsmopen/libctb-0.16/src/linux/serport.cpp
index a369abc..d190567 100644
--- a/src/mod/endpoints/mod_gsmopen/libctb-0.16/src/linux/serport.cpp
+++ b/src/mod/endpoints/mod_gsmopen/libctb-0.16/src/linux/serport.cpp
@@ -136,7 +136,7 @@ namespace ctb {
//
int SerialPort::Ioctl(int cmd, void* args)
{
- int count = 0;
+ /* int count = 0;
int err = 0;
struct serial_icounter_struct info;
SerialPort_EINFO einfo;
@@ -184,7 +184,8 @@ namespace ctb {
return -1;
}
last_info = info;
- return 0;
+ return 0;*/
+ return -1;
};
int SerialPort::IsOpen()
@@ -292,9 +293,9 @@ namespace ctb {
// request the actual numbers of breaks, framing, overrun
// and parity errors (because Linux summing all of them during
// system lifetime, not only while serial port is open.
- ioctl(fd,TIOCGICOUNT,&save_info);
+ //ioctl(fd,TIOCGICOUNT,&save_info);
// it's also careless, but we assume, that there was no error
- last_info = save_info;
+ //last_info = save_info;
// in case of a non-standard rate, the termios struct have to set
// with the B38400 rate, see above!
@@ -359,7 +360,7 @@ namespace ctb {
int SerialPort::SetBaudrateAny( int baudrate )
{
- struct serial_struct ser_info;
+ /* struct serial_struct ser_info;
int result = ioctl( fd, TIOCGSERIAL, &ser_info );
@@ -369,7 +370,8 @@ namespace ctb {
result = ioctl( fd, TIOCSSERIAL, &ser_info );
- return result;
+ return result;*/
+ return -1;
}
int SerialPort::SetBaudrateStandard( int baudrate )
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论