Commit 0021b21f authored by Simon Morlat's avatar Simon Morlat

fix bad handling of call transfer sipfrags and compilation warning

parent 929bc974
...@@ -2113,7 +2113,11 @@ static int lpc_cmd_speak(LinphoneCore *lc, char *args){ ...@@ -2113,7 +2113,11 @@ static int lpc_cmd_speak(LinphoneCore *lc, char *args){
#ifdef __APPLE__ #ifdef __APPLE__
mktemp(wavfile); mktemp(wavfile);
#else #else
mkstemp(wavfile); if (mkstemp(wavfile)==-1){
ms_error("Could not create temporary filename: %s", strerror(errno));
linphonec_out("An error occured, please consult logs for details.");
return 1;
}
#endif #endif
snprintf(cl,sizeof(cl),"espeak -v %s -s 100 -w %s --stdin",voice,wavfile); snprintf(cl,sizeof(cl),"espeak -v %s -s 100 -w %s --stdin",voice,wavfile);
......
...@@ -208,7 +208,7 @@ void sal_op_process_refer(SalOp *op, const belle_sip_request_event_t *event, bel ...@@ -208,7 +208,7 @@ void sal_op_process_refer(SalOp *op, const belle_sip_request_event_t *event, bel
belle_sip_free(refer_to_uri_str); belle_sip_free(refer_to_uri_str);
} else { } else {
ms_warning("cannot do anything with the refer without destination\n"); ms_warning("cannot do anything with the refer without destination\n");
resp = sal_op_create_response_from_request(op,req,501); resp = sal_op_create_response_from_request(op,req,400);
belle_sip_server_transaction_send_response(server_transaction,resp); belle_sip_server_transaction_send_response(server_transaction,resp);
} }
...@@ -233,9 +233,9 @@ void sal_op_call_process_notify(SalOp *op, const belle_sip_request_event_t *even ...@@ -233,9 +233,9 @@ void sal_op_call_process_notify(SalOp *op, const belle_sip_request_event_t *even
if (sipfrag){ if (sipfrag){
int code=belle_sip_response_get_status_code(sipfrag); int code=belle_sip_response_get_status_code(sipfrag);
SalReferStatus status=SalReferFailed; SalReferStatus status=SalReferFailed;
if (code==100){ if (code<200){
status=SalReferTrying; status=SalReferTrying;
}else if (code==200){ }else if (code<300){
status=SalReferSuccess; status=SalReferSuccess;
}else if (code>=400){ }else if (code>=400){
status=SalReferFailed; status=SalReferFailed;
......
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