[evolution-ews] Get the atatchment id from the correct soap parameter



commit 80da5115cb06e08a113e5393ac4a35c28788fd16
Author: Or Goshen <orx goshen intel com>
Date:   Tue Jul 19 12:03:10 2011 +0300

    Get the atatchment id from the correct soap parameter

 src/server/e-ews-connection.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/server/e-ews-connection.c b/src/server/e-ews-connection.c
index 355a55e..55567e0 100644
--- a/src/server/e-ews-connection.c
+++ b/src/server/e-ews-connection.c
@@ -3402,7 +3402,7 @@ create_attachments_response_cb (ESoapParameter *param,
 				EwsNode *enode)
 {
 	/* http://msdn.microsoft.com/en-us/library/aa565877%28v=EXCHG.80%29.aspx */
-	ESoapParameter *subparam, *attspara, *last_relevant = NULL;
+	ESoapParameter *subparam, *attspara, *last_relevant = NULL, *attparam;
 	EwsAsyncData *async_data;
 
 	async_data = g_simple_async_result_get_op_res_gpointer (enode->simple);
@@ -3411,9 +3411,10 @@ create_attachments_response_cb (ESoapParameter *param,
 
 	for (subparam = e_soap_parameter_get_first_child (attspara); subparam != NULL; subparam = e_soap_parameter_get_next_child (subparam)) {
 		if (!g_ascii_strcasecmp (e_soap_parameter_get_name(subparam), "FileAttachment")) {
-			last_relevant = subparam;
+			attparam = e_soap_parameter_get_first_child (subparam);
+			last_relevant = attparam;
 
-			async_data->items = g_slist_append (async_data->items, e_soap_parameter_get_property (subparam, "Id"));
+			async_data->items = g_slist_append (async_data->items, e_soap_parameter_get_property (attparam, "Id"));
 		}
 	}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]