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

17a85d
diff -up openchange-openchange-2.3-VULCAN/libmapi/IMSProvider.c.fix-connection-args openchange-openchange-2.3-VULCAN/libmapi/IMSProvider.c
17a85d
--- openchange-openchange-2.3-VULCAN/libmapi/IMSProvider.c.fix-connection-args	2015-05-16 17:22:04.000000000 +0200
17a85d
+++ openchange-openchange-2.3-VULCAN/libmapi/IMSProvider.c	2016-04-07 19:10:30.340959912 +0200
17a85d
@@ -91,6 +91,7 @@ static char *build_binding_string(struct
17a85d
 				  struct mapi_profile *profile)
17a85d
 {
17a85d
 	char	*binding;
17a85d
+	bool	any_string_added = false;
17a85d
 
17a85d
 	/* Sanity Checks */
17a85d
 	if (!profile) return NULL;
17a85d
@@ -101,15 +102,23 @@ static char *build_binding_string(struct
17a85d
 
17a85d
 	/* If dump-data option is enabled */
17a85d
 	if (mapi_ctx->dumpdata == true) {
17a85d
-		binding = talloc_strdup_append(binding, "print,");
17a85d
+		binding = talloc_strdup_append(binding, "print");
17a85d
+		any_string_added = true;
17a85d
 	}
17a85d
 	/* If seal option is enabled in the profile */
17a85d
 	if (profile->seal == true) {
17a85d
-		binding = talloc_strdup_append(binding, "seal,");
17a85d
+		if (any_string_added) {
17a85d
+			binding = talloc_strdup_append(binding, ",");
17a85d
+		}
17a85d
+		binding = talloc_strdup_append(binding, "seal");
17a85d
+		any_string_added = true;
17a85d
 	}
17a85d
 	/* If localaddress parameter is available in the profile */
17a85d
 	if (profile->localaddr) {
17a85d
-		binding = talloc_asprintf_append(binding, "localaddress=%s,", profile->localaddr);
17a85d
+		if (any_string_added) {
17a85d
+			binding = talloc_strdup_append(binding, ",");
17a85d
+		}
17a85d
+		binding = talloc_asprintf_append(binding, "localaddress=%s", profile->localaddr);
17a85d
 	}
17a85d
 	
17a85d
 	binding = talloc_strdup_append(binding, "]");