~ubuntu-branches/ubuntu/precise/topal/precise

« back to all changes in this revision

Viewing changes to pine-4.50-patch

  • Committer: Bazaar Package Importer
  • Author(s): Phil Brooke
  • Date: 2008-07-18 07:57:38 UTC
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20080718075738-i1szqvmxz0evz32p
Tags: upstream-62
ImportĀ upstreamĀ versionĀ 62

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Only in pine4.50/: .bld.hlp
2
 
Only in pine4.50/: bin
3
 
diff -cr OP/pine4.50/imap/src/c-client/mail.h pine4.50/imap/src/c-client/mail.h
4
 
*** OP/pine4.50/imap/src/c-client/mail.h        Tue Oct 29 01:10:29 2002
5
 
--- pine4.50/imap/src/c-client/mail.h   Fri Nov 22 11:42:08 2002
6
 
***************
7
 
*** 651,656 ****
8
 
--- 651,657 ----
9
 
      unsigned long bytes;      /* size of text in octets */
10
 
    } size;
11
 
    char *md5;                  /* MD5 checksum */
12
 
+   unsigned short topal_hack;    /* set to 1 if topal has wrecked the sending */
13
 
  };
14
 
  
15
 
  
16
 
Only in pine4.50/imap/src/c-client: mail.h.orig
17
 
Only in pine4.50/pine: date.c
18
 
diff -cr OP/pine4.50/pine/pine.h pine4.50/pine/pine.h
19
 
*** OP/pine4.50/pine/pine.h     Wed Nov 20 18:19:44 2002
20
 
--- pine4.50/pine/pine.h        Fri Nov 22 11:42:38 2002
21
 
***************
22
 
*** 63,69 ****
23
 
  #ifndef _PINE_INCLUDED
24
 
  #define _PINE_INCLUDED
25
 
  
26
 
! #define PINE_VERSION          "4.50"
27
 
  #define       PHONE_HOME_VERSION      "-count"
28
 
  #define       PHONE_HOME_HOST         "docserver.cac.washington.edu"
29
 
  
30
 
--- 63,69 ----
31
 
  #ifndef _PINE_INCLUDED
32
 
  #define _PINE_INCLUDED
33
 
  
34
 
! #define PINE_VERSION          "4.50T"
35
 
  #define       PHONE_HOME_VERSION      "-count"
36
 
  #define       PHONE_HOME_HOST         "docserver.cac.washington.edu"
37
 
  
38
 
Only in pine4.50/pine: pine.h.orig
39
 
Only in pine4.50/pine: pine.h.rej
40
 
diff -cr OP/pine4.50/pine/send.c pine4.50/pine/send.c
41
 
*** OP/pine4.50/pine/send.c     Wed Nov 20 22:51:49 2002
42
 
--- pine4.50/pine/send.c        Fri Nov 22 11:42:08 2002
43
 
***************
44
 
*** 4764,4769 ****
45
 
--- 4764,4779 ----
46
 
      pbf = save_previous_pbuf;
47
 
      g_rolenick = NULL;
48
 
  
49
 
+     if ((*body)->type == TYPEMULTIPART 
50
 
+       && (*body)->topal_hack == 1)
51
 
+       /* This was a single part message which Topal mangled. */
52
 
+       (*body)->type = TYPETEXT;
53
 
+     if ((*body)->type == TYPEMULTIPART
54
 
+       && (*body)->topal_hack != 1)
55
 
+       /* Topal mangled a multipart message.  So the first nested part
56
 
+        is really TYPETEXT. */
57
 
+       (*body)->nested.part->body.type = TYPETEXT;
58
 
+     
59
 
      dprint(4, (debugfile, "=== send returning ===\n"));
60
 
  }
61
 
  
62
 
***************
63
 
*** 6076,6088 ****
64
 
                                  ;
65
 
  
66
 
                                rfc822_parse_content_header(nb,ucase(buf+8),s);
67
 
!                               if(nb->type == TYPETEXT
68
 
!                                  && nb->subtype
69
 
                                   && (!b->subtype 
70
 
                                       || strucmp(b->subtype, nb->subtype))){
71
 
                                    if(b->subtype)
72
 
                                      fs_give((void **) &b->subtype);
73
 
  
74
 
                                    b->subtype  = nb->subtype;
75
 
                                    nb->subtype = NULL;
76
 
                                      
77
 
--- 6086,6098 ----
78
 
                                  ;
79
 
  
80
 
                                rfc822_parse_content_header(nb,ucase(buf+8),s);
81
 
!                               if(nb->subtype
82
 
                                   && (!b->subtype 
83
 
                                       || strucmp(b->subtype, nb->subtype))){
84
 
                                    if(b->subtype)
85
 
                                      fs_give((void **) &b->subtype);
86
 
  
87
 
+                                   b->type     = nb->type;
88
 
                                    b->subtype  = nb->subtype;
89
 
                                    nb->subtype = NULL;
90
 
                                      
91
 
***************
92
 
*** 6090,6095 ****
93
 
--- 6100,6107 ----
94
 
                                    b->parameter = nb->parameter;
95
 
                                    nb->parameter = NULL;
96
 
                                    mail_free_body_parameter(&nb->parameter);
97
 
+                                   if (b->type != TYPETEXT)
98
 
+                                     b->topal_hack = 1;
99
 
                                }
100
 
  
101
 
                                mail_free_body(&nb);
102
 
***************
103
 
*** 8726,8742 ****
104
 
    dprint(4, (debugfile, "-- pine_encode_body: %d\n", body ? body->type : 0));
105
 
    if (body) switch (body->type) {
106
 
    case TYPEMULTIPART:         /* multi-part */
107
 
!     if (!body->parameter) {   /* cookie not set up yet? */
108
 
!       char tmp[MAILTMPLEN];   /* make cookie not in BASE64 or QUOTEPRINT*/
109
 
!       sprintf (tmp,"%ld-%ld-%ld=:%ld",gethostid (),random (),time (0),
110
 
!              getpid ());
111
 
!       body->parameter = mail_newbody_parameter ();
112
 
!       body->parameter->attribute = cpystr ("BOUNDARY");
113
 
!       body->parameter->value = cpystr (tmp);
114
 
!     }
115
 
!     part = body->nested.part; /* encode body parts */
116
 
!     do pine_encode_body (&part->body);
117
 
!     while (part = part->next);        /* until done */
118
 
      break;
119
 
  /* case MESSAGE:      */      /* here for documentation */
120
 
      /* Encapsulated messages are always treated as text objects at this point.
121
 
--- 8738,8756 ----
122
 
    dprint(4, (debugfile, "-- pine_encode_body: %d\n", body ? body->type : 0));
123
 
    if (body) switch (body->type) {
124
 
    case TYPEMULTIPART:         /* multi-part */
125
 
!     if (body->topal_hack != 1){
126
 
!       if (!body->parameter) { /* cookie not set up yet? */
127
 
!       char tmp[MAILTMPLEN];   /* make cookie not in BASE64 or QUOTEPRINT*/
128
 
!       sprintf (tmp,"%ld-%ld-%ld=:%ld",gethostid (),random (),time (0),
129
 
!                getpid ());
130
 
!       body->parameter = mail_newbody_parameter ();
131
 
!       body->parameter->attribute = cpystr ("BOUNDARY");
132
 
!       body->parameter->value = cpystr (tmp);
133
 
!       }
134
 
!       part = body->nested.part;       /* encode body parts */
135
 
!       do pine_encode_body (&part->body);
136
 
!       while (part = part->next);      /* until done */
137
 
!     }
138
 
      break;
139
 
  /* case MESSAGE:      */      /* here for documentation */
140
 
      /* Encapsulated messages are always treated as text objects at this point.
141
 
***************
142
 
*** 8906,8912 ****
143
 
  
144
 
      dprint(4, (debugfile, "-- pine_rfc822_output_body: %d\n",
145
 
               body ? body->type : 0));
146
 
!     if(body->type == TYPEMULTIPART) {   /* multipart gets special handling */
147
 
        part = body->nested.part;       /* first body part */
148
 
                                        /* find cookie */
149
 
        for (param = body->parameter; param && !cookie; param = param->next)
150
 
--- 8920,8927 ----
151
 
  
152
 
      dprint(4, (debugfile, "-- pine_rfc822_output_body: %d\n",
153
 
               body ? body->type : 0));
154
 
!     if(body->type == TYPEMULTIPART
155
 
!        && body->topal_hack != 1) {   /* multipart gets special handling */
156
 
        part = body->nested.part;       /* first body part */
157
 
                                        /* find cookie */
158
 
        for (param = body->parameter; param && !cookie; param = param->next)
159
 
***************
160
 
*** 8966,8972 ****
161
 
         * Convert text pieces to canonical form
162
 
         * BEFORE applying any encoding (rfc1341: appendix G)...
163
 
         */
164
 
!       if(body->type == TYPETEXT){
165
 
            gf_link_filter(gf_local_nvtnl, NULL);
166
 
        }
167
 
  
168
 
--- 8981,8988 ----
169
 
         * Convert text pieces to canonical form
170
 
         * BEFORE applying any encoding (rfc1341: appendix G)...
171
 
         */
172
 
!       if(body->type == TYPETEXT
173
 
!          | (body->type == TYPEMULTIPART && body->topal_hack == 1)){
174
 
            gf_link_filter(gf_local_nvtnl, NULL);
175
 
        }
176
 
  
177
 
***************
178
 
*** 9075,9089 ****
179
 
                              ? body->subtype
180
 
                              : rfc822_default_subtype (body->type))))
181
 
          return(pwbh_finish(0, so));
182
 
!           
183
 
        if (param){
184
 
!           do
185
 
!             if(!(so_puts(so, "; ")
186
 
!                  && rfc2231_output(so, param->attribute, param->value,
187
 
!                                    (char *) tspecials,
188
 
!                                    ps_global->VAR_CHAR_SET)))
189
 
!               return(pwbh_finish(0, so));
190
 
!           while (param = param->next);
191
 
        }
192
 
        else if(!so_puts(so, "; CHARSET=US-ASCII"))
193
 
          return(pwbh_finish(0, so));
194
 
--- 9091,9117 ----
195
 
                              ? body->subtype
196
 
                              : rfc822_default_subtype (body->type))))
197
 
          return(pwbh_finish(0, so));
198
 
!       
199
 
        if (param){
200
 
!         do
201
 
!           if(body->topal_hack == 1 
202
 
!              && !struncmp(param->attribute, "protocol", 9))
203
 
!             {
204
 
!               if(!(so_puts(so, "; \015\012\011")
205
 
!                    && rfc2231_output(so, param->attribute, param->value,
206
 
!                                      (char *) tspecials,
207
 
!                                      ps_global->VAR_CHAR_SET)))
208
 
!                 return(pwbh_finish(0, so));
209
 
!             }
210
 
!           else
211
 
!             {
212
 
!               if(!(so_puts(so, "; ")
213
 
!                    && rfc2231_output(so, param->attribute, param->value,
214
 
!                                      (char *) tspecials,
215
 
!                                      ps_global->VAR_CHAR_SET)))
216
 
!                 return(pwbh_finish(0, so));
217
 
!             }
218
 
!         while (param = param->next);
219
 
        }
220
 
        else if(!so_puts(so, "; CHARSET=US-ASCII"))
221
 
          return(pwbh_finish(0, so));
222
 
***************
223
 
*** 9341,9347 ****
224
 
      long  l = 0L;
225
 
      PART *part;
226
 
  
227
 
!     if(body->type == TYPEMULTIPART) {   /* multipart gets special handling */
228
 
        part = body->nested.part;       /* first body part */
229
 
        do                              /* for each part */
230
 
          l += send_body_size(&part->body);
231
 
--- 9369,9376 ----
232
 
      long  l = 0L;
233
 
      PART *part;
234
 
  
235
 
!     if(body->type == TYPEMULTIPART
236
 
!        && body->topal_hack != 1) {   /* multipart gets special handling */
237
 
        part = body->nested.part;       /* first body part */
238
 
        do                              /* for each part */
239
 
          l += send_body_size(&part->body);