Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

Allow for Classes to be members of other Classes #2255

Closed

Description

@michaelrsweet

Version: 1.2.7
CUPS.org User: opher

Hello,
If I have two classes Class1 and Class2, this command will add them to MyClass:
lpadmin -p Class1 -c MyClass
lpadmin -p Class2 -c MyClass
This could be equally well be performed from the WEB interface.
In the WEB interface the URLs of Class1 and Class2 listed under the "members" of MyClass are correct.
But, after I restart my server (RedHat EL 4 / FedoraCore 6) or even restart CUPS with:
service cups restart
The URLs of Class1 and Class2 listed under the "members" of MyClass are incorrect. They show http://localhost:631/printers/Class1 and http://:631/printers/Class2.
Restarting CUPS through the admin page does not break things.

Regards,
Opher Shachar.

Activity

  1. michaelrsweet commented on Feb 27, 2007

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    Try the attached patch; basically, if a class is referenced before it is declared in classes.conf, the scheduler would end up creating a dummy printer queue but not reusing it.

  2. michaelrsweet commented on Mar 5, 2007

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: opher

    Hi Mike,
    I'm affraid I can't build and install the v1.3 with the fix (or any other version) for lack of a machine.

    Regards,
    Opher Shachar.

  3. michaelrsweet commented on Mar 15, 2007

    @michaelrsweet
    ContributorAuthor

    "str2255.patch":

    Index: classes.c

    --- classes.c (revision 6311)
    +++ classes.c (working copy)
    @@ -366,7 +366,21 @@
    {
    cupsdLogMessage(CUPSD_LOG_DEBUG, "Loading class %s...", value);

    •    p = cupsdAddClass(value);
      
    •   /*
      
    •    \* Since prior classes may have implicitly defined this class,
      
    • * see if it already exists...
    • */
    •    if ((p = cupsdFindDest(value)) != NULL)
      
    • {
    • p->type = CUPS_PRINTER_CLASS;
      
    • cupsdSetStringf(&p->uri, "ipp://%s:%d/classes/%s", ServerName,
      
    •                 LocalPort, value);
      
    • cupsdSetString(&p->error_policy, "retry-job");
      
    • }
    • else
    •      p = cupsdAddClass(value);
      
      p->accepting = 1;
      p->state = IPP_PRINTER_IDLE;
  4. added this to the Stable milestone on Mar 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions