| 5830 | */ |
| 5831 | |
| 5832 | static cups_array_t * /* O - Array of attributes or NULL */ |
| 5833 | create_requested_array(ipp_t *request) /* I - IPP request */ |
| 5834 | { |
| 5835 | cups_array_t *ra; /* Requested attributes array */ |
| 5836 | |
| 5837 | |
| 5838 | /* |
| 5839 | * Create the array for standard attributes... |
| 5840 | */ |
| 5841 | |
| 5842 | ra = ippCreateRequestedArray(request); |
| 5843 | |
| 5844 | /* |
| 5845 | * Add CUPS defaults as needed... |
| 5846 | */ |
| 5847 | |
| 5848 | if (cupsArrayFind(ra, "printer-defaults")) |
| 5849 | { |
| 5850 | /* |
| 5851 | * Include user-set defaults... |
| 5852 | */ |
| 5853 | |
| 5854 | char *name; /* Option name */ |
| 5855 | |
| 5856 | cupsArrayRemove(ra, "printer-defaults"); |
| 5857 | |
| 5858 | for (name = (char *)cupsArrayFirst(CommonDefaults); |
| 5859 | name; |
| 5860 | name = (char *)cupsArrayNext(CommonDefaults)) |
| 5861 | if (!cupsArrayFind(ra, name)) |
| 5862 | cupsArrayAdd(ra, name); |
| 5863 | } |
| 5864 | |
| 5865 | return (ra); |
| 5866 | } |
| 5867 | |
| 5868 | |
| 5869 | /* |
no test coverage detected