]> sjero.net Git - linphone/blobdiff - coreapi/sal_eXosip2.c
Merge branch 'master' of git.linphone.org:linphone
[linphone] / coreapi / sal_eXosip2.c
index fdaa639b204490fbc7b924fba3b1b364baa267a6..076839a1077cf87d831f8d2903693baf6c68000b 100644 (file)
@@ -1953,7 +1953,8 @@ static bool_t registration_failure(Sal *sal, eXosip_event_t *ev){
 
 static void other_request_reply(Sal *sal,eXosip_event_t *ev){
        SalOp *op=find_op(sal,ev);
-
+       LinphoneChatMessage* chat_msg;
+       ms_message("Processing reponse status [%i] for method [%s]",ev->response->status_code,osip_message_get_method(ev->request));
        if (op==NULL){
                ms_warning("other_request_reply(): Receiving response to unknown request.");
                return;
@@ -1962,6 +1963,16 @@ static void other_request_reply(Sal *sal,eXosip_event_t *ev){
                update_contact_from_response(op,ev->response);
                if (ev->request && strcmp(osip_message_get_method(ev->request),"OPTIONS")==0)
                        sal->callbacks.ping_reply(op);
+               else if (ev->request && strcmp(osip_message_get_method(ev->request),"MESSAGE")==0) {
+                       /*out of call message acknolegment*/
+                       chat_msg=(LinphoneChatMessage* )op->base.user_pointer;
+                       if (chat_msg->cb) {
+                               chat_msg->cb(chat_msg
+                                                        ,(ev->response->status_code==200?LinphoneChatMessageStateDelivered:LinphoneChatMessageStateNotDelivered)
+                                                        ,chat_msg->cb_ud);
+                       }
+                       linphone_chat_message_destroy(chat_msg);
+               }
        }
 }