/[winpt]/trunk/Src/wptMAPI.cpp
ViewVC logotype

Diff of /trunk/Src/wptMAPI.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 5 by twoaday, Mon Mar 7 13:21:36 2005 UTC revision 22 by twoaday, Wed Aug 10 11:33:35 2005 UTC
# Line 198  conv_recipients (gpgme_recipients_t rset Line 198  conv_recipients (gpgme_recipients_t rset
198          if (!(p = strchr (s, '<')) || !(q = strchr (s, '>')))          if (!(p = strchr (s, '<')) || !(q = strchr (s, '>')))
199              continue;              continue;
200          buf = (char * )calloc (1, (q-s)-(p-s)+2);          buf = (char * )calloc (1, (q-s)-(p-s)+2);
201            if (!buf)
202                BUG (0);
203          strncpy (buf, s+(p-s)+1, (q-s)-(p-s)-1);          strncpy (buf, s+(p-s)+1, (q-s)-(p-s)-1);
204          gpgme_recipients_add_name (r, buf);          gpgme_recipients_add_name (r, buf);
205          safe_free (buf);          safe_free (buf);
# Line 306  mapi_send_message (gpgme_recipients_t rs Line 308  mapi_send_message (gpgme_recipients_t rs
308      }      }
309    
310      msg = (MapiMessage *)calloc (1, sizeof * msg);      msg = (MapiMessage *)calloc (1, sizeof * msg);
311        if (!msg)
312            BUG (0);
313      p = msg->lpszSubject = strdup (subject);      p = msg->lpszSubject = strdup (subject);
314      if (!p)      if (!p)
315          BUG (0);          BUG (0);
# Line 314  mapi_send_message (gpgme_recipients_t rs Line 318  mapi_send_message (gpgme_recipients_t rs
318          BUG (0);          BUG (0);
319      n = msg->nRecipCount = gpgme_recipients_count (rset);      n = msg->nRecipCount = gpgme_recipients_count (rset);
320      recip = (MapiRecipDesc *)calloc (n+1, sizeof * recip);      recip = (MapiRecipDesc *)calloc (n+1, sizeof * recip);
321        if (!recip)
322            BUG (0);
323            
324      gpgme_recipients_enum_open (rset, &ctx);      gpgme_recipients_enum_open (rset, &ctx);
325      while ((s = gpgme_recipients_enum_read (rset, &ctx))) {      while ((s = gpgme_recipients_enum_read (rset, &ctx))) {
# Line 331  mapi_send_message (gpgme_recipients_t rs Line 337  mapi_send_message (gpgme_recipients_t rs
337      if (nfiles) {      if (nfiles) {
338          msg->nFileCount = nfiles;          msg->nFileCount = nfiles;
339          attch = (MapiFileDesc *)calloc (nfiles+1, sizeof * attch);          attch = (MapiFileDesc *)calloc (nfiles+1, sizeof * attch);
340            if (!attch)
341                BUG (0);
342          for (i=0; i < nfiles; i++) {          for (i=0; i < nfiles; i++) {
343              char * p = secure_attachment (rset, *files);              char * p = secure_attachment (rset, *files);
344              if (!p)              if (!p)
# Line 430  winpt_mail_proc (HWND dlg, UINT msg, WPA Line 438  winpt_mail_proc (HWND dlg, UINT msg, WPA
438                  return FALSE;                  return FALSE;
439              }              }
440              msgbuf = (char * )calloc (1, n+2);              msgbuf = (char * )calloc (1, n+2);
441                if (!msgbuf)
442                    BUG (0);
443              GetDlgItemText (dlg, IDC_PMAIL_MSG, msgbuf, n+1);              GetDlgItemText (dlg, IDC_PMAIL_MSG, msgbuf, n+1);
444              mapi_send_message (rset, msgbuf, subject, NULL, 0);              mapi_send_message (rset, msgbuf, subject, NULL, 0);
445              safe_free (msgbuf);              safe_free (msgbuf);

Legend:
Removed from v.5  
changed lines
  Added in v.22

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26