diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-06-19 12:03:35 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-06-19 12:03:35 +0000 |
commit | e5880189d171755e0095bdbbdb59e71abd110a06 (patch) | |
tree | 90045357009b901b3e71acdb32f4efe7f8845c94 /pjsip/src/pjsip-simple/presence.c | |
parent | 6b6b34b136196ceeed1271046875348872391935 (diff) |
Changed in presence: incoming NOTIFY without body will not change presence status (previously it will set status to closed)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@519 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/pjsip-simple/presence.c')
-rw-r--r-- | pjsip/src/pjsip-simple/presence.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/pjsip/src/pjsip-simple/presence.c b/pjsip/src/pjsip-simple/presence.c index 88e38152..9694c81c 100644 --- a/pjsip/src/pjsip-simple/presence.c +++ b/pjsip/src/pjsip-simple/presence.c @@ -897,9 +897,6 @@ static void pres_on_evsub_rx_notify( pjsip_evsub *sub, pres = pjsip_evsub_get_mod_data(sub, mod_presence.id); PJ_ASSERT_ON_FAIL(pres!=NULL, {return;}); - /* Only process the message body if it exists, otherwise treat as - * presence status is closed. - */ if (rdata->msg_info.msg->body) { status = pres_process_rx_notify( pres, rdata, p_st_code, p_st_text, res_hdr ); @@ -907,12 +904,20 @@ static void pres_on_evsub_rx_notify( pjsip_evsub *sub, return; } else { + /* This has just been changed. Previously, we treat incoming NOTIFY + * with no message body as having the presence subscription closed. + * Now we treat it as no change in presence status (ref: EyeBeam). + */ +#if 1 + *p_st_code = 200; + return; +#else unsigned i; - /* Subscription is terminated. Consider contact is offline */ pres->tmp_status._is_valid = PJ_TRUE; for (i=0; i<pres->tmp_status.info_cnt; ++i) pres->tmp_status.info[i].basic_open = PJ_FALSE; +#endif } /* Notify application. */ |