From c46ab1b0da6c2b5bdfd2701fe994da123962089c Mon Sep 17 00:00:00 2001
From: glerch <guido.lerch@gmail.com>
Date: Mon, 7 Sep 2015 13:13:53 +0200
Subject: [PATCH 1/2] Adding buddy to dive

---
 uemis-downloader.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/uemis-downloader.c b/uemis-downloader.c
index 0cb0f9f..8d81451 100644
--- a/uemis-downloader.c
+++ b/uemis-downloader.c
@@ -731,8 +731,8 @@ static void parse_tag(struct dive *dive, char *tag, char *val)
 	} else if (!strcmp(tag, "u8SuitThickness")) {
 		if (*suit_thickness[atoi(val)])
 			uemis_add_string(translate("gettextFromC", suit_thickness[atoi(val)]), &dive->suit);
-	} else if (!strcmp(tag, "dive_no")) {
-		dive->number = atoi(val);
+    } else if (!strcmp(tag, "nickname")) {
+        uemis_add_string(val, &dive->buddy);
 	}
 }
 
@@ -1215,13 +1215,6 @@ const char *do_uemis_import(device_data_t *data)
 					break;
 			}
 
-			/*
-			for (int i = iStartCleanup; i < data->download_table->nr; i++)
-			if (!data->download_table->dives[i]->downloaded) {
-				uemis_delete_dive(data, data->download_table->dives[i]->dc.diveid);
-				i = (i > iStartCleanup ? i-- : i = iStartCleanup);
-			}
-			 */
 			start = end;
 
 			/* Do some memory checking here */
-- 
1.9.5 (Apple Git-50.3)

