From: Anthony Minessale Date: Tue, 19 Oct 2010 18:58:30 +0000 (-0500) Subject: fix presence update from dp to apply to pidf presence X-Git-Tag: v1.2-rc1~265^2~11^2~154^2~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad74326b3f005bb97c3ed0e1bf783c8357b31cf1;p=thirdparty%2Ffreeswitch.git fix presence update from dp to apply to pidf presence --- diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index cdaec04d5e..07e9cacfb4 100644 --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -728,7 +728,12 @@ static void actual_sofia_presence_event_handler(switch_event_t *event) sync_sla(profile, euser, host, SWITCH_TRUE, SWITCH_TRUE); } - + + if (!strcmp(proto, "dp")) { + sql = switch_mprintf("update sip_presence set rpid='%q',status='%q' where sip_user='%q' and sip_host='%q'", + rpid, status, euser, host); + sofia_glue_execute_sql_now(profile, &sql, SWITCH_TRUE); + } sql = switch_mprintf("select status,rpid from sip_dialogs where sip_from_user='%q' and sip_from_host='%q'", euser, host); sofia_glue_execute_sql_callback(profile, profile->ireg_mutex, sql, sofia_presence_dialog_callback, &dh);