diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2013-04-27 16:10:26 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-04-27 21:00:11 -0700 |
commit | 172982b86038812e8914d1017c910168cf80e640 (patch) | |
tree | f1f6526f2de99019a6b18b375608bc0d91ded3f7 /webservice.c | |
parent | 5c4a7c749885efc620f168860c051631e18ea786 (diff) | |
download | subsurface-172982b86038812e8914d1017c910168cf80e640.tar.gz |
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>
Diffstat (limited to 'webservice.c')
-rw-r--r-- | webservice.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/webservice.c b/webservice.c index f11dc37a9..c01b1a844 100644 --- a/webservice.c +++ b/webservice.c @@ -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); |