This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

fix_sending_to_GAL_contacts-0.10.patch

By: a guest on Apr 1st, 2011  |  syntax: C++  |  size: 4.14 KB  |  views: 59  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. diff -Naur openchange-0.10-NOMAD/libmapi//IMessage.c openchange-0.10-NOMAD-kirurgs/libmapi//IMessage.c
  2. --- openchange-0.10-NOMAD/libmapi//IMessage.c   2010-08-27 13:22:25.000000000 +0300
  3. +++ openchange-0.10-NOMAD-kirurgs/libmapi//IMessage.c   2011-03-31 12:52:09.000000000 +0300
  4. @@ -728,9 +728,8 @@
  5.          * append here property tags that can be fetched with
  6.          * ResolveNames but shouldn't be included in ModifyRecipients rows
  7.          */
  8. -       request.properties = get_MAPITAGS_SRow(mem_ctx, &SRowSet->aRow[0]);
  9. -       count = SRowSet->aRow[0].cValues - 1;
  10. -       request.prop_count = MAPITAGS_delete_entries(request.properties, count, 17,
  11. +       request.properties = get_MAPITAGS_SRow(mem_ctx, &SRowSet->aRow[0], &count);
  12. +       request.prop_count = MAPITAGS_delete_entries(request.properties, count, 19,
  13.                                                      PR_ENTRYID,
  14.                                                      PR_DISPLAY_NAME,
  15.                                                      PR_DISPLAY_NAME_UNICODE,
  16. @@ -747,7 +746,9 @@
  17.                                                      PR_ADDRTYPE_UNICODE,
  18.                                                      PR_ADDRTYPE_ERROR,
  19.                                                      PR_SEND_INTERNET_ENCODING,
  20. -                                                    PR_SEND_INTERNET_ENCODING_ERROR);
  21. +                                                    PR_SEND_INTERNET_ENCODING_ERROR,
  22. +                                                    PR_SEND_RICH_INFO,
  23. +                                                    PR_SEND_RICH_INFO_ERROR);
  24.         size += request.prop_count * sizeof(uint32_t);
  25.         request.cValues = SRowSet->cRows;
  26.         size += sizeof(uint16_t);
  27. @@ -804,7 +805,7 @@
  28.                         break;
  29.                 case (0x208):
  30.                         RecipientRow->EmailAddress.lpszW = (const char *) find_SPropValue_data(aRow, PR_SMTP_ADDRESS_UNICODE);
  31. -                       size += strlen(RecipientRow->EmailAddress.lpszW) * 2 + 2;
  32. +                       size += get_utf8_utf16_conv_length(RecipientRow->EmailAddress.lpszW);
  33.                         break;
  34.                 default:
  35.                         break;
  36. @@ -818,7 +819,7 @@
  37.                         break;
  38.                 case (0x210):
  39.                         RecipientRow->DisplayName.lpszW = (const char *) find_SPropValue_data(aRow, PR_DISPLAY_NAME_UNICODE);
  40. -                       size += strlen(RecipientRow->DisplayName.lpszW) * 2 + 2;
  41. +                       size += get_utf8_utf16_conv_length(RecipientRow->DisplayName.lpszW);
  42.                         break;
  43.                 default:
  44.                         break;
  45. @@ -832,7 +833,7 @@
  46.                         break;
  47.                 case (0x220):
  48.                         RecipientRow->TransmittableDisplayName.lpszW = (const char *) find_SPropValue_data(aRow, PR_TRANSMITTABLE_DISPLAY_NAME_UNICODE);
  49. -                       size += strlen(RecipientRow->TransmittableDisplayName.lpszW) * 2 + 2;
  50. +                       size += get_utf8_utf16_conv_length(RecipientRow->TransmittableDisplayName.lpszW);
  51.                         break;
  52.                 default:
  53.                         break;
  54. @@ -847,7 +848,7 @@
  55.                         break;
  56.                 case (0x600):
  57.                         RecipientRow->SimpleDisplayName.lpszW = (const char *) find_SPropValue_data(aRow, PR_7BIT_DISPLAY_NAME_UNICODE);
  58. -                       size += strlen(RecipientRow->SimpleDisplayName.lpszW) * 2 + 2;
  59. +                       size += get_utf8_utf16_conv_length(RecipientRow->SimpleDisplayName.lpszW);
  60.                         break;
  61.                 default:
  62.                         break;
  63. diff -Naur openchange-0.10-NOMAD/libmapi//libmapi_private.h openchange-0.10-NOMAD-kirurgs/libmapi//libmapi_private.h
  64. --- openchange-0.10-NOMAD/libmapi//libmapi_private.h    2010-08-27 13:22:25.000000000 +0300
  65. +++ openchange-0.10-NOMAD-kirurgs/libmapi//libmapi_private.h    2011-03-31 12:52:09.000000000 +0300
  66. @@ -106,7 +106,8 @@
  67.  enum MAPISTATUS                mapi_object_bookmark_find(mapi_object_t *, uint32_t,struct SBinary_short *);
  68.  
  69. /* The following private definitions come from libmapi/property.c */
  70. -enum MAPITAGS          *get_MAPITAGS_SRow(TALLOC_CTX *, struct SRow *);
  71. +/*enum MAPITAGS                *get_MAPITAGS_SRow(TALLOC_CTX *, struct SRow *);*/
  72. +enum MAPITAGS          *get_MAPITAGS_SRow(TALLOC_CTX *, struct SRow *, uint32_t *);
  73.  uint32_t               MAPITAGS_delete_entries(enum MAPITAGS *, uint32_t, uint32_t, ...);
  74.  size_t                 get_utf8_utf16_conv_length(const char *);
  75.  
  76. diff -Naur openchange-0.10-NOMAD/libmapi//property.c openchange-0.10-NOMAD-kirurgs/libmapi//property.c
  77. --- openchange-0.10-NOMAD/libmapi//property.c   2010-09-16 11:15:34.000000000 +0300
  78. +++ openchange-0.10-NOMAD-kirurgs/libmapi//property.c   2011-03-31 12:52:09.000000000 +0300
  79. @@ -183,7 +183,9 @@
  80.   Create a MAPITAGS array from a SRow entry
  81.  */
  82.  
  83. -enum MAPITAGS *get_MAPITAGS_SRow(TALLOC_CTX *mem_ctx, struct SRow *aRow)
  84. +enum MAPITAGS *get_MAPITAGS_SRow(TALLOC_CTX *mem_ctx,
  85. +                                struct SRow *aRow,
  86. +                                uint32_t *actual_count)
  87. {
  88.         enum MAPITAGS   *mapitags;
  89.         uint32_t        count, idx;
  90. @@ -197,6 +199,8 @@
  91.                 }
  92.         }
  93.         mapitags[idx] = 0;
  94. +       *actual_count = idx;
  95. +
  96.         return mapitags;
  97. }
clone this paste RAW Paste Data