Commit Diff


commit - 2fb25d87ff7b3572bc98a7bea5f7380727b180e5
commit + d72940a3a166aaa6620b4b444af1fa16b5e216f5
blob - 5063726b9a209a27338b1b4ac917758c171bcac9
blob + b23d9fe465844dc654c2dce903331128cc7ae3f1
--- gotwebd/parse.y
+++ gotwebd/parse.y
@@ -922,7 +922,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;
@@ -1037,7 +1037,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));