mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
Handle HTTP error responses during log collection upload.
This commit is contained in:
parent
0013ebeceb
commit
229623f331
1 changed files with 5 additions and 2 deletions
|
|
@ -817,8 +817,7 @@ static void process_response_from_post_file_log_collection(void *data, const bel
|
|||
l = belle_http_request_listener_create_from_callbacks(&cbs, core);
|
||||
belle_sip_object_data_set(BELLE_SIP_OBJECT(req), "http_request_listener", l, belle_sip_object_unref); // Ensure the listener object is destroyed when the request is destroyed
|
||||
belle_http_provider_send_request(core->http_provider, req, l);
|
||||
}
|
||||
if (code == 200) { /* The file has been uploaded correctly, get the server reply */
|
||||
} else if (code == 200) { /* The file has been uploaded correctly, get the server reply */
|
||||
xmlDocPtr xmlMessageBody;
|
||||
xmlNodePtr cur;
|
||||
xmlChar *file_url = NULL;
|
||||
|
|
@ -850,6 +849,10 @@ static void process_response_from_post_file_log_collection(void *data, const bel
|
|||
linphone_core_notify_log_collection_upload_state_changed(core, LinphoneCoreLogCollectionUploadStateDelivered, (const char *)file_url);
|
||||
}
|
||||
clean_log_collection_upload_context(core);
|
||||
} else {
|
||||
ms_error("Unexpected HTTP response code %i during log collection upload to %s", code, linphone_core_get_log_collection_upload_server_url(core));
|
||||
linphone_core_notify_log_collection_upload_state_changed(core, LinphoneCoreLogCollectionUploadStateNotDelivered, "Unexpected HTTP response");
|
||||
clean_log_collection_upload_context(core);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue