projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1d8bbd8
)
internet_addressing.c: minor cleanups
author
Art Cancro
<ajc@citadel.org>
Wed, 27 Mar 2024 20:09:55 +0000
(13:09 -0700)
committer
Art Cancro
<ajc@citadel.org>
Wed, 27 Mar 2024 20:09:55 +0000
(13:09 -0700)
citadel/server/internet_addressing.c
patch
|
blob
|
history
diff --git
a/citadel/server/internet_addressing.c
b/citadel/server/internet_addressing.c
index e1a9e2ff0e2119795ddfee6b0fb4e9cc87dbb393..09d7fd1315a1ad7b380e84e5c3a644597872dd39 100644
(file)
--- a/
citadel/server/internet_addressing.c
+++ b/
citadel/server/internet_addressing.c
@@
-338,7
+338,7
@@
struct recptypes *validate_recipients(char *recipients_in, int Flags) {
strncpy(this_recp, org_recp, sizeof this_recp);
int i;
strncpy(this_recp, org_recp, sizeof this_recp);
int i;
- for (i=0; i<3; ++i) { // pass three times through the aliaser
+ for (i=0; i<3; ++i) {
// pass three times through the aliaser
mailtype = expand_aliases(this_recp, aliases);
// If an alias expanded to multiple recipients, strip off those recipients and append them
mailtype = expand_aliases(this_recp, aliases);
// If an alias expanded to multiple recipients, strip off those recipients and append them
@@
-666,12
+666,8
@@
void unfold_rfc822_field(char **field, char **FieldEnd)
*FieldEnd = pFieldEnd;
// convert non-space whitespace to spaces, and remove double blanks
*FieldEnd = pFieldEnd;
// convert non-space whitespace to spaces, and remove double blanks
- for (sField = *field = pField;
- sField < pFieldEnd;
- pField++, sField++)
- {
- if ((*sField=='\r') || (*sField=='\n'))
- {
+ for (sField = *field = pField; sField < pFieldEnd; pField++, sField++) {
+ if ((*sField=='\r') || (*sField=='\n')) {
int offset = 1;
while ( ( (*(sField + offset) == '\r') || (*(sField + offset) == '\n' )) && (sField + offset < pFieldEnd) ) {
offset ++;
int offset = 1;
while ( ( (*(sField + offset) == '\r') || (*(sField + offset) == '\n' )) && (sField + offset < pFieldEnd) ) {
offset ++;
@@
-687,8
+683,7
@@
void unfold_rfc822_field(char **field, char **FieldEnd)
pField++;
sField++;
pField++;
sField++;
- while ((sField < pFieldEnd) &&
- isspace(*sField))
+ while ((sField < pFieldEnd) && isspace(*sField))
sField++;
*pField = *sField;
}
sField++;
*pField = *sField;
}
@@
-943,8
+938,6
@@
int convert_field(struct CtdlMessage *msg, const char *beg, const char *end) {
processed = 1;
}
processed = 1;
}
-
-
// Clean up and move on.
free(key); // Don't free 'value', it's actually the same buffer
return processed;
// Clean up and move on.
free(key); // Don't free 'value', it's actually the same buffer
return processed;
@@
-1039,7
+1032,6
@@
struct CtdlMessage *convert_internet_message_buf(StrBuf **rfc822) {
}
++pos;
}
++pos;
-
}
// At this point we have a field. Are we interested in it?
}
// At this point we have a field. Are we interested in it?
@@
-1056,8
+1048,9
@@
struct CtdlMessage *convert_internet_message_buf(StrBuf **rfc822) {
alldone = 1;
}
StrBufAppendBufPlain(OtherHeaders, HKEY("\n"), 0);
alldone = 1;
}
StrBufAppendBufPlain(OtherHeaders, HKEY("\n"), 0);
- if (pos < totalend)
+ if (pos < totalend)
{
StrBufAppendBufPlain(OtherHeaders, pos, totalend - pos, 0);
StrBufAppendBufPlain(OtherHeaders, pos, totalend - pos, 0);
+ }
FreeStrBuf(rfc822);
CM_SetAsFieldSB(msg, eMessageText, &OtherHeaders);
FreeStrBuf(rfc822);
CM_SetAsFieldSB(msg, eMessageText, &OtherHeaders);
@@
-1228,8
+1221,7
@@
int CtdlDirectoryLookup(char *target, char *internet_addr, size_t targbuflen) {
}
}
-// Harvest any email addresses that someone might want to have in their
-// "collected addresses" book.
+// Harvest any email addresses that someone might want to have in their "collected addresses" book.
char *harvest_collected_addresses(struct CtdlMessage *msg) {
char *coll = NULL;
char addr[256];
char *harvest_collected_addresses(struct CtdlMessage *msg) {
char *coll = NULL;
char addr[256];