[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] I guess I found a bug in file sal_op_call.c, f

From: Rodrigo Pimenta Carvalho
Subject: Re: [Linphone-developers] I guess I found a bug in file sal_op_call.c, from liblinphone
Date: Wed, 26 Mar 2014 08:56:50 -0300


Thank you very much for the reply.

How can I  checkout all files that was in such commit  b57f8b1526e3ea128480a9672e84215c6fbc26cc? That is, how to use git commands to see this fix?
I would like to see the differences in the source code, but I'm a beginner in GIT.
Thanks again.
Rodrigo Pimenta Carvalho.

Em 26/03/2014, às 07:09, Ghislain MARY <address@hidden> escreveu:


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


On 25/03/2014 22:39, Rodrigo Pimenta Carvalho wrote:
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();
} 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));
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

Linphone-developers mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]