소스 검색

daemon: properly report error in error case

Currently, in method_list_games (`ListGames` on the bus), when
sd_bus_message_append fails, we break the loop but then we were
not reporting the error (contained in r) back to call.
Christian Kellner 5 년 전
부모
커밋
02ad53584d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      daemon/gamemode-dbus.c

+ 1 - 1
daemon/gamemode-dbus.c

@@ -257,7 +257,7 @@ static int method_list_games(sd_bus_message *m, void *userdata,
 	free(clients);
 
 	if (r < 0)
-		return 0;
+		return r;
 
 	r = sd_bus_message_close_container(reply);
 	if (r < 0)