]> www.infradead.org Git - users/dwmw2/crm114-spamd.git/commitdiff
fix spam/not-spam output
authorJohannes Berg <johannes@sipsolutions.net>
Fri, 5 Oct 2007 16:04:45 +0000 (18:04 +0200)
committerJohannes Berg <johannes@sipsolutions.net>
Fri, 5 Oct 2007 16:04:45 +0000 (18:04 +0200)
crm114-spamd.c

index 43feba149e6056fdbc69d992d92faa41bdb057dd..ad4644cc354ce85d9d77ff76824c1503f5105339 100644 (file)
@@ -172,7 +172,10 @@ int main(int argc, char **argv)
        sscanf(statusline, "X-CRM114-Status: %s ( %f )", status, &score);
 
        printf("SPAMD/1.2 0 EX_OK\r\n");
-       printf("Spam: %s ; %.2f / %.2f\r\n", status, -score, 0.0);
+       if (strcmp(status, "SPAM") == 0)
+               printf("Spam: True ; %.2f / %.2f\r\n", -score, 0.0);
+       else
+               printf("Spam: False ; %.2f / %.2f\r\n", -score, 0.0);
        printf("\r\n");
 
        printf("%s", buf);