提交 2fc9b069 authored 作者: Anthony Minessale's avatar Anthony Minessale

chop off resource in chat stuff

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3850 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 2e23a95f
......@@ -391,7 +391,7 @@ static void pres_event_handler(switch_event_t *event)
static switch_status_t chat_send(char *proto, char *from, char *to, char *subject, char *body, char *hint)
{
char *user, *host, *f_user = NULL, *ffrom = NULL, *f_host = NULL;
char *user, *host, *f_user = NULL, *ffrom = NULL, *f_host = NULL, *f_resource = NULL;
struct mdl_profile *profile = NULL;
assert(proto != NULL);
......@@ -399,6 +399,9 @@ static switch_status_t chat_send(char *proto, char *from, char *to, char *subjec
if (from && (f_user = strdup(from))) {
if ((f_host = strchr(f_user, '@'))) {
*f_host++ = '\0';
if ((f_resource = strchr(f_host, '/'))) {
*f_resource++ = '\0';
}
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论