]> git.marmaro.de Git - mmh/blobdiff - sbr/getthreadid.c
seq_read and seq_list also recognise msg which don't exist
[mmh] / sbr / getthreadid.c
index 41e3e22b9a488dca2c3b2d0b02b0b33b3527054f..a1ad7a0e99ab032bacd70ce2245655c7e3862c01 100644 (file)
@@ -14,15 +14,17 @@ getthreadid(const char *path)
        enum state state = FLD2;
        FILE *file = fopen(path, "r");
 
-       while (state == FLD2 && !msgid && !referens) {
+       while (state == FLD2 && !(msgid && referens)) {
                switch (state = m_getfld2(state, &f, file)) {
                case FLD2:
                        if (strncasecmp("message-id", f.name, f.namelen)==0) {
                                msgid = f.value;
                                f.value = NULL;
+                               f.alloclen = 0;
                        } else if (strncasecmp("references", f.name, f.namelen)==0) {
                                referens = f.value;
                                f.value = NULL;
+                               f.alloclen = 0;
                        }
                        break;
                default: