mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Display divelogs.de upload status to the user
This shows a dialog indicating the success or failure of divelogs.de upload. Currently the raw XML returned from the SOAP request is also displayed. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
5c4a7c7498
commit
172982b860
3 changed files with 52 additions and 10 deletions
|
|
@ -359,7 +359,7 @@ static gboolean divelogde_dialog(const char **user, const char **pass)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int divelogde_upload(char *fn)
|
||||
int divelogde_upload(char *fn, char **error)
|
||||
{
|
||||
SoupMessage *msg;
|
||||
SoupMultipart *multipart;
|
||||
|
|
@ -386,10 +386,7 @@ int divelogde_upload(char *fn)
|
|||
soup_message_headers_append(msg->request_headers, "Accept", "text/xml");
|
||||
soup_session_send_message(session, msg);
|
||||
if (SOUP_STATUS_IS_SUCCESSFUL(msg->status_code)) {
|
||||
/* we should really check if the XML returned indicates that
|
||||
* the profiles were successfully uploaded...
|
||||
*/
|
||||
fprintf(stderr, "%s\n", (gchar *)msg->response_body->data);
|
||||
*error = strdup(msg->response_body->data);
|
||||
ret = TRUE;
|
||||
}
|
||||
soup_session_abort(session);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue