Commit d0279bf4 authored by Margaux Clerc's avatar Margaux Clerc
Browse files

Fix bug report

parent 59fa81ec
...@@ -1400,6 +1400,7 @@ copy_file(const char *from, const char *to) ...@@ -1400,6 +1400,7 @@ copy_file(const char *from, const char *to)
snprintf(message, 255, "Can't open %s for writing: %s\n", snprintf(message, 255, "Can't open %s for writing: %s\n",
to, strerror(errno)); to, strerror(errno));
fprintf(stderr, "%s", message); fprintf(stderr, "%s", message);
fclose(in);
return 0; return 0;
} }
...@@ -1408,6 +1409,8 @@ copy_file(const char *from, const char *to) ...@@ -1408,6 +1409,8 @@ copy_file(const char *from, const char *to)
{ {
if ( ! fwrite(buf, 1, n, out) ) if ( ! fwrite(buf, 1, n, out) )
{ {
fclose(in);
fclose(out);
return 0; return 0;
} }
} }
......
...@@ -204,13 +204,13 @@ void linphone_create_table(sqlite3* db){ ...@@ -204,13 +204,13 @@ void linphone_create_table(sqlite3* db){
void linphone_core_message_storage_init(LinphoneCore *lc){ void linphone_core_message_storage_init(LinphoneCore *lc){
int ret; int ret;
char *errmsg=NULL; const char *errmsg;
sqlite3 *db; sqlite3 *db;
ret=sqlite3_open(lc->chat_db_file,&db); ret=sqlite3_open(lc->chat_db_file,&db);
if(ret != SQLITE_OK) { if(ret != SQLITE_OK) {
errmsg=sqlite3_errmsg(db);
printf("Error in the opening: %s.\n", errmsg); printf("Error in the opening: %s.\n", errmsg);
sqlite3_close(db); sqlite3_close(db);
sqlite3_free(errmsg);
} }
linphone_create_table(db); linphone_create_table(db);
lc->db=db; lc->db=db;
......
...@@ -1464,6 +1464,7 @@ static bool_t call_failure(Sal *sal, eXosip_event_t *ev){ ...@@ -1464,6 +1464,7 @@ static bool_t call_failure(Sal *sal, eXosip_event_t *ev){
case 480: case 480:
error=SalErrorFailure; error=SalErrorFailure;
sr=SalReasonTemporarilyUnavailable; sr=SalReasonTemporarilyUnavailable;
break;
case 486: case 486:
error=SalErrorFailure; error=SalErrorFailure;
sr=SalReasonBusy; sr=SalReasonBusy;
......
...@@ -547,7 +547,7 @@ int sdp_to_media_description(sdp_message_t *msg, SalMediaDescription *desc){ ...@@ -547,7 +547,7 @@ int sdp_to_media_description(sdp_message_t *msg, SalMediaDescription *desc){
for (k=0;valid_count < SAL_CRYPTO_ALGO_MAX && (attr=sdp_message_attribute_get(msg,i,k))!=NULL;k++){ for (k=0;valid_count < SAL_CRYPTO_ALGO_MAX && (attr=sdp_message_attribute_get(msg,i,k))!=NULL;k++){
char tmp[256], tmp2[256]; char tmp[256], tmp2[256];
if (keywordcmp("crypto",attr->a_att_field)==0 && attr->a_att_value!=NULL){ if (keywordcmp("crypto",attr->a_att_field)==0 && attr->a_att_value!=NULL){
int nb = sscanf(attr->a_att_value, "%d %256s inline:%256s", int nb = sscanf(attr->a_att_value, "%d %255s inline:%255s",
&stream->crypto[valid_count].tag, &stream->crypto[valid_count].tag,
tmp, tmp,
tmp2); tmp2);
......
...@@ -741,11 +741,12 @@ static gboolean in_call_view_terminated(LinphoneCall *call){ ...@@ -741,11 +741,12 @@ static gboolean in_call_view_terminated(LinphoneCall *call){
void linphone_gtk_in_call_view_terminate(LinphoneCall *call, const char *error_msg){ void linphone_gtk_in_call_view_terminate(LinphoneCall *call, const char *error_msg){
GtkWidget *callview=(GtkWidget*)linphone_call_get_user_pointer(call); GtkWidget *callview=(GtkWidget*)linphone_call_get_user_pointer(call);
if(callview==NULL) return;
GtkWidget *status=linphone_gtk_get_widget(callview,"in_call_status"); GtkWidget *status=linphone_gtk_get_widget(callview,"in_call_status");
guint taskid=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(callview),"taskid")); guint taskid=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(callview),"taskid"));
gboolean in_conf=linphone_call_params_local_conference_mode(linphone_call_get_current_params(call)); gboolean in_conf=linphone_call_params_local_conference_mode(linphone_call_get_current_params(call));
if ((callview==NULL) || (status==NULL)) return; if (status==NULL) return;
if (error_msg==NULL) if (error_msg==NULL)
gtk_label_set_markup(GTK_LABEL(status),_("<b>Call ended.</b>")); gtk_label_set_markup(GTK_LABEL(status),_("<b>Call ended.</b>"));
else{ else{
......
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