Commit 5f45d360 authored by Simon Morlat's avatar Simon Morlat

fix unauthicated notifies

parent f3031103
......@@ -841,6 +841,9 @@ static SalOp *find_op(Sal *sal, eXosip_event_t *ev){
if (ev->sid>0){
return sal_find_out_subscribe(sal,ev->sid);
}
if (ev->nid>0){
return sal_find_in_subscribe(sal,ev->nid);
}
if (ev->response) return sal_find_other(sal,ev->response);
return NULL;
}
......@@ -1791,6 +1794,7 @@ static bool_t process_event(Sal *sal, eXosip_event_t *ev){
other_request_reply(sal,ev);
break;
case EXOSIP_MESSAGE_REQUESTFAILURE:
case EXOSIP_NOTIFICATION_REQUESTFAILURE:
if (ev->response) {
switch (ev->response->status_code) {
case 407:
......
......@@ -79,6 +79,7 @@ void sal_exosip_subscription_closed(Sal *sal,eXosip_event_t *ev);
void sal_exosip_in_subscription_closed(Sal *sal, eXosip_event_t *ev);
SalOp * sal_find_out_subscribe(Sal *sal, int sid);
SalOp * sal_find_in_subscribe(Sal *sal, int nid);
void sal_exosip_fix_route(SalOp *op);
void _osip_list_set_empty(osip_list_t *l, void (*freefunc)(void*));
......
......@@ -50,7 +50,7 @@ void sal_remove_out_subscribe(Sal *sal, SalOp *op){
sal->out_subscribes=ms_list_remove(sal->out_subscribes,op);
}
static SalOp * sal_find_in_subscribe(Sal *sal, int nid){
SalOp * sal_find_in_subscribe(Sal *sal, int nid){
const MSList *elem;
SalOp *op;
for(elem=sal->in_subscribes;elem!=NULL;elem=elem->next){
......@@ -569,6 +569,7 @@ int sal_notify_presence(SalOp *op, SalPresenceStatus status, const char *status_
if (msg!=NULL){
const char *identity=sal_op_get_contact(op);
if (identity==NULL) identity=sal_op_get_to(op);
_osip_list_set_empty(&msg->contacts,(void (*)(void*))osip_contact_free);
osip_message_set_contact(msg,identity);
add_presence_body(msg,status);
eXosip_insubscription_send_request(op->did,msg);
......
./bin/avcodec-52.dll
./bin/avutil-50.dll
./bin/libeXosip2-4.dll
./bin/libeXosip2-6.dll
./bin/libogg.dll
./bin/libtheora.dll
./bin/libxml2-2.dll
./bin/libosip2-4.dll
./bin/libosipparser2-4.dll
./bin/libosip2-6.dll
./bin/libosipparser2-6.dll
./bin/swscale-0.dll
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment