51 lines
1.9 KiB
Diff
51 lines
1.9 KiB
Diff
|
diff -up cups-1.4rc1/scheduler/cups-driverd.cxx.str3279 cups-1.4rc1/scheduler/cups-driverd.cxx
|
||
|
--- cups-1.4rc1/scheduler/cups-driverd.cxx.str3279 2009-06-08 23:00:14.000000000 +0100
|
||
|
+++ cups-1.4rc1/scheduler/cups-driverd.cxx 2009-08-10 15:48:26.255839804 +0100
|
||
|
@@ -1493,12 +1493,16 @@ load_ppds(const char *d, /* I - Actual
|
||
|
ppd->record.size == dent->fileinfo.st_size &&
|
||
|
ppd->record.mtime == dent->fileinfo.st_mtime)
|
||
|
{
|
||
|
- do
|
||
|
+ /* Rewind to the beginning of this run. */
|
||
|
+ while ((ppd = (ppd_info_t *)cupsArrayPrev(PPDsByName)) != NULL &&
|
||
|
+ !strcmp(ppd->record.filename, name))
|
||
|
+ ;
|
||
|
+
|
||
|
+ while ((ppd = (ppd_info_t *)cupsArrayNext(PPDsByName)) != NULL &&
|
||
|
+ !strcmp(ppd->record.filename, name))
|
||
|
{
|
||
|
ppd->found = 1;
|
||
|
}
|
||
|
- while ((ppd = (ppd_info_t *)cupsArrayNext(PPDsByName)) != NULL &&
|
||
|
- !strcmp(ppd->record.filename, name));
|
||
|
|
||
|
continue;
|
||
|
}
|
||
|
@@ -1929,7 +1933,7 @@ load_drv(const char *filename, /* I -
|
||
|
* Add a dummy entry for the file...
|
||
|
*/
|
||
|
|
||
|
- add_ppd(filename, filename, "", "", "", "", "", "", mtime, size, 0,
|
||
|
+ add_ppd(name, name, "", "", "", "", "", "", mtime, size, 0,
|
||
|
PPD_TYPE_DRV, "drv");
|
||
|
ChangedPPD = 1;
|
||
|
|
||
|
@@ -1988,7 +1992,7 @@ load_drv(const char *filename, /* I -
|
||
|
{
|
||
|
product_found = true;
|
||
|
|
||
|
- add_ppd(filename, uri, "en", d->manufacturer->value, make_model,
|
||
|
+ add_ppd(name, uri, "en", d->manufacturer->value, make_model,
|
||
|
device_id ? device_id->value->value : "",
|
||
|
product->value->value,
|
||
|
ps_version ? ps_version->value->value : "(3010) 0",
|
||
|
@@ -1996,7 +2000,7 @@ load_drv(const char *filename, /* I -
|
||
|
}
|
||
|
|
||
|
if (!product_found)
|
||
|
- add_ppd(filename, uri, "en", d->manufacturer->value, make_model,
|
||
|
+ add_ppd(name, uri, "en", d->manufacturer->value, make_model,
|
||
|
device_id ? device_id->value->value : "",
|
||
|
d->model_name->value,
|
||
|
ps_version ? ps_version->value->value : "(3010) 0",
|