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

64c3c4
diff -up openchange-openchange-2.3-VULCAN/libmapi/IMSProvider.c.fix-connection-args openchange-openchange-2.3-VULCAN/libmapi/IMSProvider.c
64c3c4
--- openchange-openchange-2.3-VULCAN/libmapi/IMSProvider.c.fix-connection-args	2015-05-16 17:22:04.000000000 +0200
64c3c4
+++ openchange-openchange-2.3-VULCAN/libmapi/IMSProvider.c	2016-04-07 19:10:30.340959912 +0200
64c3c4
@@ -91,6 +91,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;
64c3c4
@@ -101,15 +102,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, "]");