[libdmapsharing] _actual_http_response_handler: check error rather than structure for NULL



commit 2f5bee99c8fcd62cbe82dfdcb2061339aa54427c
Author: W. Michael Petullo <mike flyn org>
Date:   Tue May 26 00:16:51 2020 -0400

    _actual_http_response_handler: check error rather than structure for NULL

 libdmapsharing/dmap-connection.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/libdmapsharing/dmap-connection.c b/libdmapsharing/dmap-connection.c
index 4a93bc5..ed8dc21 100644
--- a/libdmapsharing/dmap-connection.c
+++ b/libdmapsharing/dmap-connection.c
@@ -759,7 +759,7 @@ _actual_http_response_handler (DmapResponseData * data)
                                            data->connection);
                }
                structure = dmap_structure_parse (response, response_length, &error);
-               if (structure == NULL) {
+               if (error != NULL) {
                        dmap_connection_emit_error(data->connection, error->code,
                                                  "Error parsing %s response: %s\n", message_path,
                                                   error->message);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]