- }
- else if ((phase == 0) && (!strncasecmp(bptr, "from=", 4))) {
- extract_token(from, bptr, 1, '=', sizeof(from));
- }
- else if ((phase == 0) && (!strncasecmp(bptr, "text", 4))) {
- phase = 1;
- }
- else if ((phase == 1) && (IsEmptyStr(bptr))) {
- phase = 2;
-
- if (
- (msg4_content_length > 0)
- && (!strcasecmp(msg4_content_encoding, "7bit"))
- && ( (!strcasecmp(mime_content_type, "text/calendar"))
+ else if (!strncasecmp(bptr, "from=", 4)) {
+ extract_token(from, bptr, 1, '=', sizeof(from));
+ }
+ else if ((phase == 0) && (!strncasecmp(bptr, "text", 4))) {
+ phase = 1;
+ }
+ break;
+ case 1:
+ if (!IsEmptyStr(bptr)) {
+ if (!strncasecmp(bptr, "Content-type: ", 14)) {
+ safestrncpy(msg4_content_type, &bptr[14], sizeof msg4_content_type);
+ striplt(msg4_content_type);
+ }
+ else if (!strncasecmp(bptr, "Content-transfer-encoding: ", 27)) {
+ safestrncpy(msg4_content_encoding, &bptr[27], sizeof msg4_content_encoding);
+ striplt(msg4_content_type);
+ }
+ else if ((!strncasecmp(bptr, "Content-length: ", 16))) {
+ msg4_content_length = atoi(&bptr[16]);
+ }
+ break;
+ }
+ else {
+ phase++;
+
+ if ((msg4_content_length > 0)
+ && ( !strcasecmp(msg4_content_encoding, "7bit"))
+ && ((!strcasecmp(mime_content_type, "text/calendar"))