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

cups + ipptool + duplicate attribute values #5278

Closed
goudal-emmk opened this issue Mar 27, 2018 · 6 comments
Closed

cups + ipptool + duplicate attribute values #5278

goudal-emmk opened this issue Mar 27, 2018 · 6 comments
Assignees

Comments

@goudal-emmk
Copy link

Cups version 2.1.3
When requesting completed-jobs with ipptool, I've got an error « duplicate attribute ». Which prevent the tabular output to get printed.
From the xml file I have :

ipp://xxxxx:631/jobs/34335
job-originating-user-name
username
job-originating-user-name
username

I have found that this bug was referenced as #4275 and closed in 2016... but still there.

f.g.

@michaelrsweet
Copy link
Collaborator

Well, the job history files will always have the duplicate attributes, which is the issue that is being reported by the tool - it has no way to know which value you want reported, and the duplicate attributes are an error at the IPP protocol level.

@michaelrsweet michaelrsweet self-assigned this Mar 27, 2018
@michaelrsweet michaelrsweet added the question General usage question label Mar 27, 2018
@goudal-emmk
Copy link
Author

Well... I'm not sure I understand what do you mean : only ONE job had a duplicate value.
And if so, why not displaying the result in tabular output - or at least put an error message ? As the XML file got all the values.
And if it is always the case (not for the present moment on my printers) why the error is not correctly treaded ?

@michaelrsweet
Copy link
Collaborator

We can consider changing the current behavior, but what should what behavior be?

If we display a table of values, do we show an error message about the duplicate and then put the first value in the table, or do we display a placeholder "ERROR" string for any duplicates?

@michaelrsweet michaelrsweet reopened this Mar 27, 2018
@michaelrsweet michaelrsweet added priority-low and removed question General usage question labels Mar 27, 2018
@michaelrsweet michaelrsweet added this to the Future milestone Mar 27, 2018
@goudal-emmk
Copy link
Author

From my sysadmin point of view :

    1. cups is sending duplicate value ? Is it a bug ? Is it something that can be changed ?
    1. ipptool get 2 duplicate attributes : on my experience the values were the same.
    1. ipptool is able to detect the error and to give correct information in the plist output.
      What I would like is of course that duplicate values don't occurs. But if cups can't send correct data :
  • in tabular or cvs display, when you have a duplicate value, the only message printed is « ok-successful », that is obviously incorrect as an error has been found. At least an error message should be displayed, and a correct return value.
  • best : if the duplicated attributes have the same value, ignore the duplicate.
  • if the duplicated attributes have a different values, I think that displaying both could be nice, but maybe an error tag would be ok.

@goudal-emmk
Copy link
Author

Furthermore from what I have seen in debugging, there is a strange behaviour (but maybe I'm wrong) :
in the print_line function you search for attributes following the displayed array values.
But I have seen that the attribute list of the job is not always in the same order of the displayed array. As this function never goes back in the attributes list of the current job, some attributes may lack in the final result.... or maybe I have missed a point.

@michaelrsweet
Copy link
Collaborator

[master 884db541c] The ipptool program no longer checks for duplicate attributes when running in list or CSV mode (Issue #5278)

[branch-2.2 d2e90eb] The ipptool program no longer checks for duplicate attributes when running in list or CSV mode (Issue #5278)

michaelrsweet added a commit that referenced this issue Apr 3, 2018
michaelrsweet added a commit that referenced this issue Apr 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants