Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make default IPP version 2.0 #3929

Closed
michaelrsweet opened this issue Aug 17, 2011 · 2 comments

Comments

@michaelrsweet
Copy link
Collaborator

commented Aug 17, 2011

Version: 1.6-feature
CUPS.org User: mike

Time to make IPP 2.0 the default version.

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator Author

commented Nov 2, 2011

CUPS.org User: mike

Fixed in Subversion repository.

I also took the opportunity to have ippNewRequest assign monotonically-increasing request IDs (instead of always using 1).

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator Author

commented Nov 2, 2011

"str3929.patch":

Index: cups/ipp.c

--- cups/ipp.c (revision 10099)
+++ cups/ipp.c (working copy)
@@ -1582,12 +1582,12 @@
/*
* Found it, remove the attribute from the list...

*/

  • if (prev)
    prev->next = current->next;
    else

ipp->attrs = current->next;

  • if (current == ipp->last)
    ipp->last = prev;

@@ -2176,11 +2176,11 @@
if ((temp = (ipp_t )calloc(1, sizeof(ipp_t))) != NULL)
{
/

  • * Default to IPP 1.1...
    • Default to IPP 2.0...
      */
  • temp->request.any.version[0] = 1;
  • temp->request.any.version[1] = 1;
  • temp->request.any.version[0] = 2;
  • temp->request.any.version[1] = 0;
    temp->use = 1;
    }

@@ -2205,6 +2205,9 @@
{
ipp_t request; / IPP request message /
cups_lang_t *language; /
Current language localization */

  • static int request_id = 0; /* Current request ID */

  • static _cups_mutex_t request_mutex = _CUPS_MUTEX_INITIALIZER;

  •               /* Mutex for request ID */
    

    DEBUG_printf(("ippNewRequest(op=%02x(%s))", op, ippOpString(op)));
    @@ -2220,9 +2223,13 @@

    • Set the operation and request ID...
      */
  • _cupsMutexLock(&request_mutex);

request->request.op.operation_id = op;

  • request->request.op.request_id = 1;
  • request->request.op.request_id = ++request_id;
  • _cupsMutexUnlock(&request_mutex);

/*

  • Use UTF-8 as the character set...
    */
    @@ -3098,7 +3105,7 @@
    {
    if (value->collection)
    ippDelete(value->collection);

    value->collection = colvalue;
    colvalue->use ++;
    }
    @@ -3146,8 +3153,8 @@

    return (1);
    }

/*

  • 'ippSetInteger()' - Set an integer or enum value in an attribute.
    *
    @@ -3225,7 +3232,7 @@
    {
    if ((_attr)->name)
    _cupsStrFree((_attr)->name);

    (*attr)->name = temp;
    }

@@ -4802,7 +4809,7 @@
case IPP_TAG_NAMELANG :
if (element == 0 && count == attr->num_values && attr->values[0].string.language)

_cupsStrFree(attr->values[0].string.language);

  •  case IPP_TAG_TEXT :
     case IPP_TAG_NAME :
     case IPP_TAG_RESERVED_STRING :
    

@@ -4817,7 +4824,7 @@
i --, value ++)
_cupsStrFree(value->string.text);

break;

  •  case IPP_TAG_DEFAULT :
     case IPP_TAG_UNKNOWN :
     case IPP_TAG_NOVALUE :
    

@@ -4831,14 +4838,14 @@
case IPP_TAG_RESOLUTION :
case IPP_TAG_RANGE :

break;

  •  case IPP_TAG_BEGIN_COLLECTION :
    for (i = count, value = attr->values + element;
         i > 0;
         i --, value ++)
      ippDelete(value->collection);
    

break;

  •  case IPP_TAG_STRING :
     default :
    for (i = count, value = attr->values + element;
    
@michaelrsweet michaelrsweet added this to the Stable milestone Mar 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.