7d79ceb
--- cups-1.2.10/backend/ipp.c.str2109	2007-04-03 11:05:13.000000000 +0100
7d79ceb
+++ cups-1.2.10/backend/ipp.c	2007-04-03 11:05:33.000000000 +0100
7d79ceb
@@ -210,6 +210,7 @@
7d79ceb
 		  "document-format-supported",
7d79ceb
 		  "printer-is-accepting-jobs",
7d79ceb
 		  "printer-state",
7d79ceb
+		  "printer-state-message",
7d79ceb
 		  "printer-state-reasons",
7d79ceb
 		};
7d79ceb
   static const char * const jattrs[] =
7d79ceb
@@ -1285,6 +1286,11 @@
7d79ceb
 {
7d79ceb
   ipp_t	*request,			/* IPP request */
7d79ceb
 	*response;			/* IPP response */
7d79ceb
+  static const char * const attrs[] =	/* Attributes we want */
7d79ceb
+  {
7d79ceb
+    "printer-state-message",
7d79ceb
+    "printer-state-reasons"
7d79ceb
+  };
7d79ceb
 
7d79ceb
 
7d79ceb
  /*
7d79ceb
@@ -1301,8 +1307,9 @@
7d79ceb
     ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
7d79ceb
                  "requesting-user-name", NULL, user);
7d79ceb
 
7d79ceb
-  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
7d79ceb
-               "requested-attributes", NULL, "printer-state-reasons");
7d79ceb
+  ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
7d79ceb
+                "requested-attributes",
7d79ceb
+		(int)(sizeof(attrs) / sizeof(attrs[0])), NULL, attrs);
7d79ceb
 
7d79ceb
  /*
7d79ceb
   * Do the request...
7d79ceb
@@ -1430,7 +1437,8 @@
7d79ceb
 {
7d79ceb
   int			i;		/* Looping var */
7d79ceb
   int			count;		/* Count of reasons shown... */
7d79ceb
-  ipp_attribute_t	*reasons;	/* printer-state-reasons */
7d79ceb
+  ipp_attribute_t	*psm,		/* pritner-state-message */
7d79ceb
+			*reasons;	/* printer-state-reasons */
7d79ceb
   const char		*reason;	/* Current reason */
7d79ceb
   const char		*message;	/* Message to show */
7d79ceb
   char			unknown[1024];	/* Unknown message string */
7d79ceb
@@ -1438,6 +1446,10 @@
7d79ceb
   char			state[1024];	/* State string */
7d79ceb
 
7d79ceb
 
7d79ceb
+  if ((psm = ippFindAttribute(ipp, "printer-state-message",
7d79ceb
+                              IPP_TAG_TEXT)) != NULL)
7d79ceb
+    fprintf(stderr, "INFO: %s\n", psm->values[0].string.text);
7d79ceb
+
7d79ceb
   if ((reasons = ippFindAttribute(ipp, "printer-state-reasons",
7d79ceb
                                   IPP_TAG_KEYWORD)) == NULL)
7d79ceb
     return (0);