[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdelibs/kdeprint/cups
From:       Leo Savernik <l.savernik () aon ! at>
Date:       2006-04-21 15:53:58
Message-ID: 1145634838.519588.20660.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 532298 by savernik:

revert last in order to support older versions of cups as advertised


 M  +14 -4     ipprequest.cpp  


--- branches/KDE/3.5/kdelibs/kdeprint/cups/ipprequest.cpp #532297:532298
@@ -510,8 +510,18 @@
 		cupsEncodeOptions(request_, n, options);
 	cupsFreeOptions(n, options);
 
-	// find and remove that annoying "document-format" attribute
-        ipp_attribute_t *attr = ippFindAttribute(request_, "document-format", IPP_TAG_NAME);
-        ippDeleteAttribute(request_, attr);
-
+	// find an remove that annoying "document-format" attribute
+	// (can't use IppDeleteAttribute as cups 1.0.9 doesn't have that)
+	ipp_attribute_t	*attr = request_->attrs;
+	while (attr)
+	{
+		if (attr->next && strcmp(attr->next->name, "document-format") == 0)
+		{
+			ipp_attribute_t	*attr2 = attr->next;
+			attr->next = attr2->next;
+			_ipp_free_attr(attr2);
+			break;
+		}
+		attr = attr->next;
+	}
 }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic