Browse Source

Example: Fix condition (#521)

bel2125 7 years ago
parent
commit
d95d2dec54
1 changed files with 1 additions and 1 deletions
  1. 1 1
      examples/embedded_c/embedded_c.c

+ 1 - 1
examples/embedded_c/embedded_c.c

@@ -569,7 +569,7 @@ AuthStartHandler(struct mg_connection *conn, void *cbdata)
 		return 1;
 	}
 
-	if (mg_check_digest_access_authentication(conn, realm, passfile) > 0) {
+	if (mg_check_digest_access_authentication(conn, realm, passfile) <= 0) {
 		/* No valid authorization */
 		mg_send_digest_access_authentication_request(conn, realm);
 		return 1;