diff --git a/console/commands.c b/console/commands.c index 6fbedcc79..c22c963b0 100644 --- a/console/commands.c +++ b/console/commands.c @@ -2113,7 +2113,11 @@ static int lpc_cmd_speak(LinphoneCore *lc, char *args){ #ifdef __APPLE__ mktemp(wavfile); #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 snprintf(cl,sizeof(cl),"espeak -v %s -s 100 -w %s --stdin",voice,wavfile); diff --git a/coreapi/bellesip_sal/sal_op_call_transfer.c b/coreapi/bellesip_sal/sal_op_call_transfer.c index 5958c8745..84e529091 100644 --- a/coreapi/bellesip_sal/sal_op_call_transfer.c +++ b/coreapi/bellesip_sal/sal_op_call_transfer.c @@ -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); } else { 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); } @@ -233,9 +233,9 @@ void sal_op_call_process_notify(SalOp *op, const belle_sip_request_event_t *even if (sipfrag){ int code=belle_sip_response_get_status_code(sipfrag); SalReferStatus status=SalReferFailed; - if (code==100){ + if (code<200){ status=SalReferTrying; - }else if (code==200){ + }else if (code<300){ status=SalReferSuccess; }else if (code>=400){ status=SalReferFailed;