Commit Diff


commit - a90e31174c5788d5225bd2c2363056b86f670c42
commit + 1e135a4fe7efe6b6560f851452a7224c7b361427
blob - 2b149a2d3c558ef24fa1754bd315347e051675a3
blob + d19b49bd4e7b3185a6e2d2fec2463599118df729
--- gotwebd/parse.y
+++ gotwebd/parse.y
@@ -921,7 +921,7 @@ conf_new_server(const char *name)
 
 	val = getservice(D_FCGI_PORT);
 	srv->fcgi_socket_port = gotwebd->fcgi_socket_port ?
-	    gotwebd->fcgi_socket_port: htons(val);
+	    gotwebd->fcgi_socket_port: val;
 
 	srv->show_site_owner = D_SHOWSOWNER;
 	srv->show_repo_owner = D_SHOWROWNER;
@@ -1036,7 +1036,7 @@ getservice(const char *n)
 			s = getservbyname(n, "udp");
 		if (s == NULL)
 			return (-1);
-		return (s->s_port);
+		return htons(s->s_port);
 	}
 
 	return (htons((unsigned short)llval));