[cups-devel] [UNKN] STR #4414: cupsGetDestMediaCount returns 0

Olivier Guillion noreply at cups.org
Tue May 13 03:43:38 PDT 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Testing a 32 bits program on Ubuntu 14.04 64 bits with libcups2:i386 v
1.7.2-0ubunt installed. An HP network printer (HP laserjet 1022n) has been
installed for this test, but it also provide the same results on another
computer with an USB Canon MG2250.

cupsGetDestMediaCount always return 0 media.

Here is the simplified source code (plain C):
- ---------------
cups_dest_t *dests,*dest;
int num_dests;
cups_dinfo_t * dinfo;
http_t * http;
int i,cancel,nbmedia;
char resource[1024];

num_dests= cupsGetDests(&dests);
for (i=0,dest=dests;i<num_dests;i++,dest++)
    {
    printf("Examining %s\n",dest->name);
    cancel=0;
    http=cupsConnectDest(dest,CUPS_DEST_FLAGS_NONE,5000,
                &cancel,resource,1023,NULL,NULL); // 5 sec timeout
    if(http) printf("  Connected to resource %s\n",resource);
   dinfo=cupsCopyDestInfo(http,dest);
   nbmedia=cupsGetDestMediaCount(http,dest,dinfo,CUPS_MEDIA_FLAGS_DEFAULT);
   printf("   %d medias\n",nbmedia);  // always get 0 !!
   }
cupsFreeDests(num_dests, dests);
- ---------------------------

Link: https://www.cups.org/str.php?L4414
Version: 1.7-current
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJTcfdaAAoJENujp6sI12IjRboP/093928+Ff7Y+pUM4lY8v3H/
CNp9KTfkiJEbr5+8mlOkqkrPfIPwyzjAXf4rW0RKs8jy8oax4g4CbbOfeib9pL18
LO+ZLpWJuixeViQEC2y8KOLej/VGbGF8xwP/wAAtKHMrJYwlxqH8LYtnTKCVwIqm
IHbkFGHrfsVDlL1WKPPnyaYTp9kCpTV6UVLS/+yrcXDgYt6HHa0yBToM+s51Fg6w
t/C1HZr3CBJWt5TFj20PI+DjFlcTO14+gFYiuUtvALKy2UeLl4vJMaONR/j8BHFc
LAVIZ1EALzItRT7JOAmAZ7n4Fefbjwivo7CdII2V9Stv4lCON0K1Uwc6jkceJOQE
ci+S5EUwFqG4NSB+imhdPJwVy6auh45wo2SHiktdQhyurDDdNVMT/tbbC+H9pAhK
s/h7eA+PRXp703+4TRF/HoIkcuLki9G3oC6HJmBnmRGkZqx2BKVU8W8q64huoxzJ
+/HQCwtxEoi+j8yxC8Y0yk2AeQ5mMllDvHSbBhxVjvVVRQyZWllfwIK8c8viCOnk
AbYlf/cSFisRduYnthcClh8i+997ZN2UyP8zQuQ4bZ+TADFEoG6MhznFV7r/le9d
MXE99lUm0uY60L6ZPVEp/tp1ZDt0AYoAwCELvr/G7tLihW2i6QxK6ZVp3bTbWzRL
OkzPizdJWbtgsbceGyQP
=4QOh
-----END PGP SIGNATURE-----




More information about the cups-devel mailing list