]> git.pld-linux.org Git - packages/openchange.git/blob - fix-connection-args.patch
- release 57 (samba 4.13.8)
[packages/openchange.git] / fix-connection-args.patch
1 diff -up openchange-openchange-2.3-VULCAN/libmapi/IMSProvider.c.fix-connection-args openchange-openchange-2.3-VULCAN/libmapi/IMSProvider.c
2 --- openchange-openchange-2.3-VULCAN/libmapi/IMSProvider.c.fix-connection-args  2015-05-16 17:22:04.000000000 +0200
3 +++ openchange-openchange-2.3-VULCAN/libmapi/IMSProvider.c      2016-04-07 19:10:30.340959912 +0200
4 @@ -91,6 +91,7 @@ static char *build_binding_string(struct
5                                   struct mapi_profile *profile)
6  {
7         char    *binding;
8 +       bool    any_string_added = false;
9  
10         /* Sanity Checks */
11         if (!profile) return NULL;
12 @@ -101,15 +102,23 @@ static char *build_binding_string(struct
13  
14         /* If dump-data option is enabled */
15         if (mapi_ctx->dumpdata == true) {
16 -               binding = talloc_strdup_append(binding, "print,");
17 +               binding = talloc_strdup_append(binding, "print");
18 +               any_string_added = true;
19         }
20         /* If seal option is enabled in the profile */
21         if (profile->seal == true) {
22 -               binding = talloc_strdup_append(binding, "seal,");
23 +               if (any_string_added) {
24 +                       binding = talloc_strdup_append(binding, ",");
25 +               }
26 +               binding = talloc_strdup_append(binding, "seal");
27 +               any_string_added = true;
28         }
29         /* If localaddress parameter is available in the profile */
30         if (profile->localaddr) {
31 -               binding = talloc_asprintf_append(binding, "localaddress=%s,", profile->localaddr);
32 +               if (any_string_added) {
33 +                       binding = talloc_strdup_append(binding, ",");
34 +               }
35 +               binding = talloc_asprintf_append(binding, "localaddress=%s", profile->localaddr);
36         }
37         
38         binding = talloc_strdup_append(binding, "]");
This page took 0.042726 seconds and 3 git commands to generate.