Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
0b763a62
提交
0b763a62
authored
8月 14, 2012
作者:
Steve Underwood
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of git.freeswitch.org:freeswitch
上级
e30406ce
eca5c0ad
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
62 行增加
和
33 行删除
+62
-33
configure.in
configure.in
+7
-0
.gitignore
libs/.gitignore
+1
-0
util.vbs
libs/win32/util.vbs
+1
-1
switch_utils.h
src/include/switch_utils.h
+10
-0
mod_conference.c
src/mod/applications/mod_conference/mod_conference.c
+2
-6
mod_json_cdr.c
src/mod/event_handlers/mod_json_cdr/mod_json_cdr.c
+4
-12
mod_xml_cdr.c
src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c
+4
-12
switch_rtp.c
src/switch_rtp.c
+2
-2
switch_utils.c
src/switch_utils.c
+31
-0
没有找到文件。
configure.in
浏览文件 @
0b763a62
...
...
@@ -495,6 +495,13 @@ AC_CHECK_FUNCS([gethostname vasprintf mmap mlock mlockall usleep getifaddrs time
AC_CHECK_FUNCS([sched_setscheduler setpriority setrlimit setgroups initgroups])
AC_CHECK_FUNCS([wcsncmp setgroups asprintf setenv pselect gettimeofday localtime_r gmtime_r strcasecmp stricmp _stricmp])
# Check availability and return type of strerror_r
# (NOTE: apr-1-config sets -D_GNU_SOURCE at build-time, need to run the check with it too)
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
AC_FUNC_STRERROR_R
CPPFLAGS="$save_CPPFLAGS"
AX_HAVE_CPU_SET
AC_CHECK_LIB(rt, clock_gettime, [AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Define if you have clock_gettime()])])
...
...
libs/.gitignore
浏览文件 @
0b763a62
...
...
@@ -880,6 +880,7 @@ missing
/yaml/tests/run-parser
/yaml/tests/run-scanner
/zeromq-*/
/jpeg-8d/
# build products we should remove
!/apr-util/xml/expat/conftools/config.guess
...
...
libs/win32/util.vbs
浏览文件 @
0b763a62
...
...
@@ -376,7 +376,7 @@ Sub CreateVersion(tmpFolder, VersionDir, includebase, includedest)
If
strLastCommit
<>
""
And
strLastCommitHuman
<>
""
And
strRevision
<>
""
Then
'Bild version string
strGitVer
=
"git~"
&
strLastCommit
&
"~"
&
strRevision
strVerHuman
=
"; git at commit "
&
strRevision
&
" on "
&
strLastCommitHuman
strVerHuman
=
strVerRev
&
"; git at commit "
&
strRevision
&
" on "
&
strLastCommitHuman
'Check for local changes, if found, append to git revision string
If
ShowUnclean
Then
...
...
src/include/switch_utils.h
浏览文件 @
0b763a62
...
...
@@ -837,6 +837,16 @@ SWITCH_DECLARE(char *) switch_format_number(const char *num);
SWITCH_DECLARE
(
unsigned
int
)
switch_atoui
(
const
char
*
nptr
);
SWITCH_DECLARE
(
unsigned
long
)
switch_atoul
(
const
char
*
nptr
);
/**
* Portable version of strerror_r(), work around for the incompatible
* return type of GNU and XSI variants.
* \param[in] errnum Error number
* \param[both] buf Buffer for error message
* \param[in] buflen Size of message buffer
* \return Pointer to message buffer, returning error message or "Unknown error xxx" if none found
*/
SWITCH_DECLARE
(
char
*
)
switch_strerror_r
(
int
errnum
,
char
*
buf
,
switch_size_t
buflen
);
SWITCH_END_EXTERN_C
#endif
/* For Emacs:
...
...
src/mod/applications/mod_conference/mod_conference.c
浏览文件 @
0b763a62
...
...
@@ -1029,12 +1029,8 @@ static void conference_cdr_render(conference_obj_t *conference)
fd
=
-
1
;
}
else
{
char
ebuf
[
512
]
=
{
0
};
#ifdef WIN32
strerror_s
(
ebuf
,
sizeof
(
ebuf
),
errno
);
#else
strerror_r
(
errno
,
ebuf
,
sizeof
(
ebuf
));
#endif
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Error writing [%s][%s]
\n
"
,
path
,
ebuf
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Error writing [%s][%s]
\n
"
,
path
,
switch_strerror_r
(
errno
,
ebuf
,
sizeof
(
ebuf
)));
}
...
...
src/mod/event_handlers/mod_json_cdr/mod_json_cdr.c
浏览文件 @
0b763a62
...
...
@@ -253,12 +253,8 @@ static switch_status_t my_on_reporting(switch_core_session_t *session)
}
}
else
{
char
ebuf
[
512
]
=
{
0
};
#ifdef WIN32
strerror_s
(
ebuf
,
sizeof
(
ebuf
),
errno
);
#else
strerror_r
(
errno
,
ebuf
,
sizeof
(
ebuf
));
#endif
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Error writing [%s][%s]
\n
"
,
path
,
ebuf
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Error writing [%s][%s]
\n
"
,
path
,
switch_strerror_r
(
errno
,
ebuf
,
sizeof
(
ebuf
)));
}
switch_safe_free
(
path
);
}
...
...
@@ -412,12 +408,8 @@ static switch_status_t my_on_reporting(switch_core_session_t *session)
break
;
}
else
{
char
ebuf
[
512
]
=
{
0
};
#ifdef WIN32
strerror_s
(
ebuf
,
sizeof
(
ebuf
),
errno
);
#else
strerror_r
(
errno
,
ebuf
,
sizeof
(
ebuf
));
#endif
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Can't open %s! [%s]
\n
"
,
path
,
ebuf
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Can't open %s! [%s]
\n
"
,
path
,
switch_strerror_r
(
errno
,
ebuf
,
sizeof
(
ebuf
)));
}
...
...
src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c
浏览文件 @
0b763a62
...
...
@@ -244,12 +244,8 @@ static switch_status_t my_on_reporting(switch_core_session_t *session)
fd
=
-
1
;
}
else
{
char
ebuf
[
512
]
=
{
0
};
#ifdef WIN32
strerror_s
(
ebuf
,
sizeof
(
ebuf
),
errno
);
#else
strerror_r
(
errno
,
ebuf
,
sizeof
(
ebuf
));
#endif
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Error writing [%s][%s]
\n
"
,
path
,
ebuf
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Error writing [%s][%s]
\n
"
,
path
,
switch_strerror_r
(
errno
,
ebuf
,
sizeof
(
ebuf
)));
}
switch_safe_free
(
path
);
}
...
...
@@ -400,12 +396,8 @@ static switch_status_t my_on_reporting(switch_core_session_t *session)
fd
=
-
1
;
}
else
{
char
ebuf
[
512
]
=
{
0
};
#ifdef WIN32
strerror_s
(
ebuf
,
sizeof
(
ebuf
),
errno
);
#else
strerror_r
(
errno
,
ebuf
,
sizeof
(
ebuf
));
#endif
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Error![%s]
\n
"
,
ebuf
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Error![%s]
\n
"
,
switch_strerror_r
(
errno
,
ebuf
,
sizeof
(
ebuf
)));
}
}
}
...
...
src/switch_rtp.c
浏览文件 @
0b763a62
...
...
@@ -3310,8 +3310,8 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
if
(
!
SWITCH_STATUS_IS_BREAK
(
poll_status
)
&&
poll_status
!=
SWITCH_STATUS_TIMEOUT
)
{
char
tmp
[
128
]
=
""
;
s
trerror_r
(
poll_status
,
tmp
,
sizeof
(
tmp
));
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session
),
SWITCH_LOG_ERROR
,
"Poll failed with error: %d [%s]
\n
"
,
poll_status
,
tmp
);
s
witch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session
),
SWITCH_LOG_ERROR
,
"Poll failed with error: %d [%s]
\n
"
,
poll_status
,
switch_strerror_r
(
poll_status
,
tmp
,
sizeof
(
tmp
))
);
ret
=
-
1
;
goto
end
;
}
...
...
src/switch_utils.c
浏览文件 @
0b763a62
...
...
@@ -2968,6 +2968,37 @@ SWITCH_DECLARE(unsigned long) switch_atoul(const char *nptr)
else
return
(
unsigned
long
)
tmp
;
}
SWITCH_DECLARE
(
char
*
)
switch_strerror_r
(
int
errnum
,
char
*
buf
,
switch_size_t
buflen
)
{
#ifdef HAVE_STRERROR_R
#ifdef STRERROR_R_CHAR_P
/* GNU variant returning char *, avoids warn-unused-result error */
return
strerror_r
(
errnum
,
buf
,
buflen
);
#else
/*
* XSI variant returning int, with GNU compatible error string,
* if no message could be found
*/
if
(
strerror_r
(
errnum
,
buf
,
buflen
))
{
switch_snprintf
(
buf
,
buflen
,
"Unknown error %d"
,
errnum
);
}
return
buf
;
#endif
/* STRERROR_R_CHAR_P */
#elif defined(WIN32)
/* WIN32 variant */
if
(
strerror_s
(
buf
,
buflen
,
errnum
))
{
switch_snprintf
(
buf
,
buflen
,
"Unknown error %d"
,
errnum
);
}
return
buf
;
#else
/* Fallback, copy string into private buffer */
switch_copy_string
(
buf
,
strerror
(
errnum
),
buflen
);
return
buf
;
#endif
}
/* For Emacs:
* Local Variables:
* mode:c
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论