mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-21 21:28:08 +00:00
start to fix bugs for presence support.
This commit is contained in:
parent
42cf5e94ad
commit
52fe995acb
3 changed files with 9 additions and 6 deletions
|
|
@ -141,8 +141,10 @@ void __linphone_friend_do_subscribe(LinphoneFriend *fr){
|
|||
if (fr->outsub==NULL){
|
||||
/* people for which we don't have yet an answer should appear as offline */
|
||||
fr->status=LINPHONE_STATUS_OFFLINE;
|
||||
/*
|
||||
if (fr->lc->vtable.notify_recv)
|
||||
fr->lc->vtable.notify_recv(fr->lc,(LinphoneFriend*)fr);
|
||||
*/
|
||||
}else{
|
||||
sal_op_release(fr->outsub);
|
||||
fr->outsub=NULL;
|
||||
|
|
|
|||
|
|
@ -1310,7 +1310,7 @@ static bool_t process_event(Sal *sal, eXosip_event_t *ev){
|
|||
sal_exosip_notify_recv(sal,ev);
|
||||
break;
|
||||
case EXOSIP_SUBSCRIPTION_ANSWERED:
|
||||
ms_message("EXOSIP_SUBSCRIPTION_ANSWERED, ev->sid=%i\n",ev->sid);
|
||||
ms_message("EXOSIP_SUBSCRIPTION_ANSWERED, ev->sid=%i, ev->did=%i\n",ev->sid,ev->did);
|
||||
sal_exosip_subscription_answered(sal,ev);
|
||||
break;
|
||||
case EXOSIP_SUBSCRIPTION_CLOSED:
|
||||
|
|
|
|||
|
|
@ -122,7 +122,8 @@ int sal_unsubscribe(SalOp *op){
|
|||
if (msg){
|
||||
osip_message_set_expires(msg,"0");
|
||||
eXosip_subscribe_send_refresh_request(op->did,msg);
|
||||
}else ms_error("Could not build subscribe refresh request !");
|
||||
}else ms_error("Could not build subscribe refresh request ! op->sid=%i, op->did=%i",
|
||||
op->sid,op->did);
|
||||
eXosip_unlock();
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -130,8 +131,8 @@ int sal_unsubscribe(SalOp *op){
|
|||
int sal_subscribe_accept(SalOp *op){
|
||||
osip_message_t *msg;
|
||||
eXosip_lock();
|
||||
eXosip_insubscription_build_answer(op->tid,202,&msg);
|
||||
eXosip_insubscription_send_answer(op->tid,202,msg);
|
||||
eXosip_insubscription_build_answer(op->tid,200,&msg);
|
||||
eXosip_insubscription_send_answer(op->tid,200,msg);
|
||||
eXosip_unlock();
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -636,8 +637,6 @@ void sal_exosip_notify_recv(Sal *sal, eXosip_event_t *ev){
|
|||
osip_from_to_str(from,&tmp);
|
||||
if (strstr(body->body,"pending")!=NULL){
|
||||
estatus=SalPresenceOffline;
|
||||
}else if ((strstr(body->body,"online")!=NULL) || (strstr(body->body,"open")!=NULL)) {
|
||||
estatus=SalPresenceOnline;
|
||||
}else if (strstr(body->body,"busy")!=NULL){
|
||||
estatus=SalPresenceBusy;
|
||||
}else if (strstr(body->body,"berightback")!=NULL
|
||||
|
|
@ -653,6 +652,8 @@ void sal_exosip_notify_recv(Sal *sal, eXosip_event_t *ev){
|
|||
estatus=SalPresenceOuttolunch;
|
||||
}else if (strstr(body->body,"closed")!=NULL){
|
||||
estatus=SalPresenceOffline;
|
||||
}else if ((strstr(body->body,"online")!=NULL) || (strstr(body->body,"open")!=NULL)) {
|
||||
estatus=SalPresenceOnline;
|
||||
}else{
|
||||
estatus=SalPresenceOffline;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue