Hi,
There was indeed a bug there that has been fixed a month ago by:
commit b57f8b1526e3ea128480a9672e84215c6fbc26cc
Author: Guillaume BIENKOWSKI
<address@hidden>
Date: Tue Feb 18 15:55:56 2014 +0100
Added 302 redirection support.
+ removed macros for sal_op_get_contact compatibility
Cheers,
Ghislain
On 25/03/2014 22:39, Rodrigo Pimenta Carvalho wrote:
Hi.
I was analyzing the code for linphone-android. See what I
have found, please.
In file sal_op_call.c, we have:
int sal_call_decline(SalOp
*op, SalReason reason, const
char *redirection /*optional*/){
belle_sip_response_t*
response;
belle_sip_header_contact_t*
contact=NULL;
int
status=sal_reason_to_sip_code(reason);
if
(reason==SalReasonRedirect){
if (redirection!=NULL) {
if (strstr(redirection,"sip:")!=0) status=302;
status=380;
<------------------------------------------------------------------------------------------------
This line seems to be forgotten here!
contact=
belle_sip_header_contact_new();
belle_sip_header_address_set_uri(BELLE_SIP_HEADER_ADDRESS(contact),belle_sip_uri_parse(redirection));
} else {
ms_error("Cannot
redirect to null");
}
}
response
=
sal_op_create_response_from_request(op,belle_sip_transaction_get_request(BELLE_SIP_TRANSACTION(op->pending_server_trans)),status);
if (contact)
belle_sip_message_add_header(BELLE_SIP_MESSAGE(response),BELLE_SIP_HEADER(contact));
belle_sip_server_transaction_send_response(op->pending_server_trans,response);
return 0;
}
Why does someone would set status to 380
immediately setting it to 302?
Is it a bug? If not, why should the code set the
status to 380 in this point?
Maybe we have to put a "else" somewhere in this
code to decide between setting status to 302 or 380, haven't
we? Confirm, please.
Any reply will be very helpful!
Thanks alot.
Rodrigo Pimenta Carvalho.
_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers