File: alpine-2.02.patch-2

package info (click to toggle)
topal 81-2
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 1,216 kB
  • sloc: ada: 11,204; ansic: 783; sh: 174; makefile: 153
file content (45 lines) | stat: -rw-r--r-- 1,981 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
diff -cr alpine-2.02-orig/imap/src/c-client/mail.c alpine-2.02-p2/imap/src/c-client/mail.c
*** alpine-2.02-orig/imap/src/c-client/mail.c	2010-10-02 09:37:57.000000000 +0100
--- alpine-2.02-p2/imap/src/c-client/mail.c	2011-03-23 21:07:05.000000000 +0000
***************
*** 2712,2717 ****
--- 2712,2719 ----
    BODY *b = NIL;
    PART *pt;
    unsigned long i;
+   /* Topal hack 2 */
+   mail_fetchstructure (stream,msgno,&b);
  				/* make sure have a body */
    if (section && *section && mail_fetchstructure (stream,msgno,&b) && b)
      while (*section) {		/* find desired section */
diff -cr alpine-2.02-orig/pith/mailcap.c alpine-2.02-p2/pith/mailcap.c
*** alpine-2.02-orig/pith/mailcap.c	2010-10-02 09:37:57.000000000 +0100
--- alpine-2.02-p2/pith/mailcap.c	2011-03-23 21:07:05.000000000 +0000
***************
*** 582,589 ****
  	 *       typically two scans through the check_extension
  	 *       mechanism, the mailcap entry now takes precedence.
  	 */
! 	if((fname = get_filename_parameter(NULL, 0, body, &e2b.from.ext)) != NULL
! 	   && e2b.from.ext && e2b.from.ext[0]){
  	    if(strlen(e2b.from.ext) < sizeof(tmp_ext) - 2){
  		strncpy(ext = tmp_ext, e2b.from.ext - 1, sizeof(tmp_ext)); /* remember it */
  		tmp_ext[sizeof(tmp_ext)-1] = '\0';
--- 582,598 ----
  	 *       typically two scans through the check_extension
  	 *       mechanism, the mailcap entry now takes precedence.
  	 */
! 	/* Topal hack 2 */
! 	fname = get_filename_parameter(NULL, 0, body, &e2b.from.ext);
! 	if (fname == NULL) {
! 	  if (body->type == TYPEMULTIPART &&
! 	      ((body->subtype && !strucmp(body->subtype, "signed"))
! 	       ||(body->subtype && !strucmp(body->subtype, "encrypted"))))
! 	    fname = cpystr("openpgp.msg");
! 	}
! 	
! 	if(fname != NULL
!          && e2b.from.ext && e2b.from.ext[0]){
  	    if(strlen(e2b.from.ext) < sizeof(tmp_ext) - 2){
  		strncpy(ext = tmp_ext, e2b.from.ext - 1, sizeof(tmp_ext)); /* remember it */
  		tmp_ext[sizeof(tmp_ext)-1] = '\0';