Index: scheduler/cups-lpd.c =================================================================== --- scheduler/cups-lpd.c (revision 7898) +++ scheduler/cups-lpd.c (working copy) @@ -81,8 +81,8 @@ */ static int create_job(http_t *http, const char *dest, const char *title, - const char *user, int num_options, - cups_option_t *options); + const char *docname, const char *user, + int num_options, cups_option_t *options); static int get_printer(http_t *http, const char *name, char *dest, int destsize, cups_option_t **options, int *accepting, int *shared, ipp_pstate_t *state); @@ -338,6 +338,7 @@ create_job(http_t *http, /* I - HTTP connection */ const char *dest, /* I - Destination name */ const char *title, /* I - job-name */ + const char *docname, /* I - Name of job file */ const char *user, /* I - requesting-user-name */ int num_options, /* I - Number of options for job */ cups_option_t *options) /* I - Options for job */ @@ -364,10 +365,14 @@ ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", NULL, user); - if (title) + if (title[0]) ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name", NULL, title); + if (docname[0]) + ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "document-name", + NULL, docname); + cupsEncodeOptions(request, num_options, options); /* @@ -1143,9 +1148,10 @@ * Grab the job information... */ - title[0] = '\0'; - user[0] = '\0'; - doccount = 0; + title[0] = '\0'; + user[0] = '\0'; + docname[0] = '\0'; + doccount = 0; while (smart_gets(line, sizeof(line), fp) != NULL) { @@ -1159,6 +1165,10 @@ strlcpy(title, line + 1, sizeof(title)); break; + case 'N' : /* Document name */ + strlcpy(docname, line + 1, sizeof(docname)); + break; + case 'P' : /* User identification */ strlcpy(user, line + 1, sizeof(user)); break; @@ -1222,7 +1232,8 @@ * Create the job... */ - if ((id = create_job(http, dest, title, user, num_options, options)) < 0) + if ((id = create_job(http, dest, title, docname, user, num_options, + options)) < 0) status = 1; else {