提交 aae3f4a3 authored 作者: Anthony Minessale's avatar Anthony Minessale

update

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10515 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 7c85dd54
...@@ -374,7 +374,7 @@ static void actual_sofia_presence_event_handler(switch_event_t *event) ...@@ -374,7 +374,7 @@ static void actual_sofia_presence_event_handler(switch_event_t *event)
"sip_subscriptions.accept,sip_subscriptions.profile_name" "sip_subscriptions.accept,sip_subscriptions.profile_name"
",1,'%q','%q',sip_presence.status,sip_presence.rpid " ",1,'%q','%q',sip_presence.status,sip_presence.rpid "
"from sip_subscriptions left join sip_presence on " "from sip_subscriptions left join sip_presence on "
"(sip_subscriptions.sip_user=sip_presence.sip_user and sip_subscriptions.sip_host=sip_presence.sip_host and " "(sip_subscriptions.sub_to_user=sip_presence.sip_user and sip_subscriptions.sub_to_host=sip_presence.sip_host and "
"sip_subscriptions.profile_name=sip_presence.profile_name) " "sip_subscriptions.profile_name=sip_presence.profile_name) "
"where sip_subscriptions.event='presence' and sip_subscriptions.full_from like '%%%q%%'", status, rpid, from); "where sip_subscriptions.event='presence' and sip_subscriptions.full_from like '%%%q%%'", status, rpid, from);
} else { } else {
...@@ -386,7 +386,7 @@ static void actual_sofia_presence_event_handler(switch_event_t *event) ...@@ -386,7 +386,7 @@ static void actual_sofia_presence_event_handler(switch_event_t *event)
"sip_subscriptions.accept,sip_subscriptions.profile_name" "sip_subscriptions.accept,sip_subscriptions.profile_name"
",1,'%q','%q',sip_presence.status,sip_presence.rpid " ",1,'%q','%q',sip_presence.status,sip_presence.rpid "
"from sip_subscriptions left join sip_presence on " "from sip_subscriptions left join sip_presence on "
"(sip_subscriptions.sip_user=sip_presence.sip_user and sip_subscriptions.sip_host=sip_presence.sip_host and " "(sip_subscriptions.sub_to_user=sip_presence.sip_user and sip_subscriptions.sub_to_host=sip_presence.sip_host and "
"sip_subscriptions.profile_name=sip_presence.profile_name) " "sip_subscriptions.profile_name=sip_presence.profile_name) "
"where sip_subscriptions.event='presence'", status, rpid); "where sip_subscriptions.event='presence'", status, rpid);
} }
...@@ -489,7 +489,7 @@ static void actual_sofia_presence_event_handler(switch_event_t *event) ...@@ -489,7 +489,7 @@ static void actual_sofia_presence_event_handler(switch_event_t *event)
",1,'%q','%q','%q',sip_presence.status,sip_presence.rpid " ",1,'%q','%q','%q',sip_presence.status,sip_presence.rpid "
"from sip_subscriptions " "from sip_subscriptions "
"left join sip_presence on " "left join sip_presence on "
"(sip_subscriptions.sip_user=sip_presence.sip_user and sip_subscriptions.sip_host=sip_presence.sip_host and " "(sip_subscriptions.sub_to_user=sip_presence.sip_user and sip_subscriptions.sub_to_host=sip_presence.sip_host and "
"sip_subscriptions.profile_name=sip_presence.profile_name) " "sip_subscriptions.profile_name=sip_presence.profile_name) "
"where (event='%q' or event='%q') and sub_to_user='%q' " "where (event='%q' or event='%q') and sub_to_user='%q' "
"and (sub_to_host='%q' or presence_hosts like '%%%q%%')", "and (sub_to_host='%q' or presence_hosts like '%%%q%%')",
...@@ -505,7 +505,7 @@ static void actual_sofia_presence_event_handler(switch_event_t *event) ...@@ -505,7 +505,7 @@ static void actual_sofia_presence_event_handler(switch_event_t *event)
",0,'%q','%q','%q',sip_presence.status,sip_presence.rpid " ",0,'%q','%q','%q',sip_presence.status,sip_presence.rpid "
"from sip_subscriptions " "from sip_subscriptions "
"left join sip_presence on " "left join sip_presence on "
"(sip_subscriptions.sip_user=sip_presence.sip_user and sip_subscriptions.sip_host=sip_presence.sip_host and " "(sip_subscriptions.sub_to_user=sip_presence.sip_user and sip_subscriptions.sub_to_host=sip_presence.sip_host and "
"sip_subscriptions.profile_name=sip_presence.profile_name) " "sip_subscriptions.profile_name=sip_presence.profile_name) "
"where (event='%q' or event='%q') and sub_to_user='%q' " "where (event='%q' or event='%q') and sub_to_user='%q' "
"and (sub_to_host='%q' or presence_hosts like '%%%q%%')", "and (sub_to_host='%q' or presence_hosts like '%%%q%%')",
...@@ -899,12 +899,6 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char * ...@@ -899,12 +899,6 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
char *rpid = argv[16]; char *rpid = argv[16];
char *sub_to_host = argv[17]; char *sub_to_host = argv[17];
if (argc > 19 && !switch_strlen_zero(argv[18]) && !switch_strlen_zero(argv[19])) {
status = argv[18];
rpid = argv[19];
}
nua_handle_t *nh; nua_handle_t *nh;
char *to = NULL; char *to = NULL;
char *open; char *open;
...@@ -917,6 +911,17 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char * ...@@ -917,6 +911,17 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
sofia_profile_t *ext_profile = NULL, *profile = helper->profile; sofia_profile_t *ext_profile = NULL, *profile = helper->profile;
if (argc > 19 && !switch_strlen_zero(argv[18]) && !switch_strlen_zero(argv[19])) {
status = argv[18];
rpid = argv[19];
}
if (switch_strlen_zero(status)) {
status = "Available";
}
if (profile_name && strcasecmp(profile_name, helper->profile->name)) { if (profile_name && strcasecmp(profile_name, helper->profile->name)) {
if ((ext_profile = sofia_glue_find_profile(profile_name))) { if ((ext_profile = sofia_glue_find_profile(profile_name))) {
profile = ext_profile; profile = ext_profile;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论