(fetch_operation) Fix section specification output.
Showing
1 changed file
with
12 additions
and
8 deletions
... | @@ -1059,24 +1059,28 @@ fetch_operation (message_t msg, char **arg, int silent) | ... | @@ -1059,24 +1059,28 @@ fetch_operation (message_t msg, char **arg, int silent) |
1059 | (*arg) += 13; | 1059 | (*arg) += 13; |
1060 | fetch_header_fields (msg, arg, start, end); | 1060 | fetch_header_fields (msg, arg, start, end); |
1061 | } | 1061 | } |
1062 | /* Last case check also for section to catch "[1.2.3]" submessages. */ | 1062 | |
1063 | else if (strncasecmp (*arg, "TEXT]", 5) == 0 || section) | 1063 | else if (strncasecmp (*arg, "TEXT]", 5) == 0) |
1064 | { | 1064 | { |
1065 | if (!silent) | 1065 | if (!silent) |
1066 | { | 1066 | { |
1067 | if (*section) | 1067 | if (*section) |
1068 | util_send ("[%s]", section); | 1068 | util_send ("[%sTEXT]", section); |
1069 | else | 1069 | else |
1070 | util_send ("[TEXT]"); | 1070 | util_send ("[TEXT]"); |
1071 | } | 1071 | } |
1072 | if (*section) | 1072 | (*arg) += 5; |
1073 | (*arg)++; | 1073 | fetch_body_content (msg, start, end); |
1074 | else | 1074 | } |
1075 | (*arg) += 5; | 1075 | else if (**arg == ']') |
1076 | { | ||
1077 | if (!silent) | ||
1078 | util_send ("[%s]", section); | ||
1079 | (*arg)++; | ||
1076 | fetch_body_content (msg, start, end); | 1080 | fetch_body_content (msg, start, end); |
1077 | } | 1081 | } |
1078 | else | 1082 | else |
1079 | util_send (" \"\""); | 1083 | util_send (" \"\"");/*FIXME: ERROR Message!*/ |
1080 | free (section); | 1084 | free (section); |
1081 | return RESP_OK; | 1085 | return RESP_OK; |
1082 | } | 1086 | } | ... | ... |
-
Please register or sign in to post a comment