Blame SOURCES/openchange-1.0-fix-connection-args.patch

205156
diff -up openchange-1.0-BORG/libmapi/IMSProvider.c.fix-samba-args openchange-1.0-BORG/libmapi/IMSProvider.c
205156
--- openchange-1.0-BORG/libmapi/IMSProvider.c.fix-samba-args	2016-04-07 18:27:16.678401391 +0200
205156
+++ openchange-1.0-BORG/libmapi/IMSProvider.c	2016-04-07 18:29:00.321613700 +0200
205156
@@ -90,6 +90,7 @@ static char *build_binding_string(struct
205156
 				  struct mapi_profile *profile)
205156
 {
205156
 	char	*binding;
205156
+	bool	any_string_added = false;
205156
 
205156
 	/* Sanity Checks */
205156
 	if (!profile) return NULL;
205156
@@ -100,15 +101,23 @@ static char *build_binding_string(struct
205156
 
205156
 	/* If dump-data option is enabled */
205156
 	if (mapi_ctx->dumpdata == true) {
205156
-		binding = talloc_strdup_append(binding, "print,");
205156
+		binding = talloc_strdup_append(binding, "print");
205156
+		any_string_added = true;
205156
 	}
205156
 	/* If seal option is enabled in the profile */
205156
 	if (profile->seal == true) {
205156
-		binding = talloc_strdup_append(binding, "seal,");
205156
+		if (any_string_added) {
205156
+			binding = talloc_strdup_append(binding, ",");
205156
+		}
205156
+		binding = talloc_strdup_append(binding, "seal");
205156
+		any_string_added = true;
205156
 	}
205156
 	/* If localaddress parameter is available in the profile */
205156
 	if (profile->localaddr) {
205156
-		binding = talloc_asprintf_append(binding, "localaddress=%s,", profile->localaddr);
205156
+		if (any_string_added) {
205156
+			binding = talloc_strdup_append(binding, ",");
205156
+		}
205156
+		binding = talloc_asprintf_append(binding, "localaddress=%s", profile->localaddr);
205156
 	}
205156
 	
205156
 	binding = talloc_strdup_append(binding, "]");