diff --git a/src/add-ons/print/transports/ipp/IppSetupDlg.cpp b/src/add-ons/print/transports/ipp/IppSetupDlg.cpp index fb0046a9e9..5285fe3a96 100644 --- a/src/add-ons/print/transports/ipp/IppSetupDlg.cpp +++ b/src/add-ons/print/transports/ipp/IppSetupDlg.cpp @@ -121,10 +121,12 @@ bool IppSetupView::UpdateViewData() HTTP_RESPONSECODE response_code = conn.getResponseCode(); if (response_code == HTTP_OK) { const char *content_type = conn.getContentType(); - if (content_type && !strncasecmp(content_type, "application/ipp", 15)) { + if (content_type == NULL + || strncasecmp(content_type, "application/ipp", 15) == 0) { const IppContent *ipp_response = conn.getIppResponse(); if (ipp_response->good()) { - dir->WriteAttr(IPP_URL, B_STRING_TYPE, 0, url->Text(), strlen(url->Text()) + 1); + dir->WriteAttr(IPP_URL, B_STRING_TYPE, 0, url->Text(), + strlen(url->Text()) + 1); return true; } else { error_msg = ipp_response->getStatusMessage(); diff --git a/src/add-ons/print/transports/ipp/IppTransport.cpp b/src/add-ons/print/transports/ipp/IppTransport.cpp index 53494c29ad..a70638734a 100644 --- a/src/add-ons/print/transports/ipp/IppTransport.cpp +++ b/src/add-ons/print/transports/ipp/IppTransport.cpp @@ -107,7 +107,7 @@ IppTransport::~IppTransport() HTTP_RESPONSECODE response_code = conn.getResponseCode(); if (response_code == HTTP_OK) { const char *content_type = conn.getContentType(); - if (content_type && !strncasecmp(content_type, "application/ipp", 15)) { + if (content_type == NULL || strncasecmp(content_type, "application/ipp", 15) == 0) { const IppContent *ipp_response = conn.getIppResponse(); if (ipp_response->fail()) { __error = true;