Skip to contentSkip to conversation

Bug in ippfind

Printing-architecture Till Kamppeter 2 participants 4 messages Jul 19, 2013 – Jul 22, 2013

lore
Share & tools
lore
#0 lore raw

Hi,

I have packaged CUPS 1.7.0 RC1 for Ubuntu Raring (13.04) and Saucy (13.10) and uploaded them to my PPA
(https://launchpad.net/~till-kamppeter/+archive/ppa).

Then I have tested the new ippfind on Saucy by simply running

ippfind

The result is

ipp://till-lenovo.local:30466/printers/Berlin ipp://till-lenovo.local:30466/printers/Berlin ipp://till-lenovo.local:30466/printers/Berlin ipp://till-lenovo.local:30466/printers/Budapest ipp://till-lenovo.local:30466/printers/LaBoheme ipp://till-lenovo.local:30466/printers/LaTraviata ipp://till-lenovo.local:30466/printers/Mailand ipp://till-lenovo.local:30466/printers/Marrakech ipp://HPOccam.local:30466/ipp/printer ipp://till-lenovo.local:30466/printers/Paris ipp://till-lenovo.local:30466/printers/SanFrancisco ipp://till-lenovo.local:30466/printers/SanFranciscoFax ipp://till-lenovo.local:30466/printers/Santorini ipp://till-lenovo.local:30466/printers/Singapur ipp://till-lenovo.local:30466/printers/Tokyo ipp://till-lenovo.local:30466/printers/Wien ipp://NPI90E6C1.local:30466/NPI90E6C1

It should be port 631 and not 30466. Looks like an endian problem or so. I tested on an x86_64 system running Ubuntu Saucy.

Till

#1 lore raw

Till,

Filed the following Apple bug to track this:

<rdar://problem/14508324> cups.org: ippfind endian issue on Linux/Avahi

I think this *is* just an endian issue, and it is limited to Avahi (strange I didn't notice it when I tested, but an easy fix)

Quoted 30 lines · Till Kamppeter

Hi,

I have packaged CUPS 1.7.0 RC1 for Ubuntu Raring (13.04) and Saucy (13.10) and uploaded them to my PPA
(https://launchpad.net/~till-kamppeter/+archive/ppa).

Then I have tested the new ippfind on Saucy by simply running

ippfind

The result is

ipp://till-lenovo.local:30466/printers/Berlin ipp://till-lenovo.local:30466/printers/Berlin ipp://till-lenovo.local:30466/printers/Berlin ipp://till-lenovo.local:30466/printers/Budapest ipp://till-lenovo.local:30466/printers/LaBoheme ipp://till-lenovo.local:30466/printers/LaTraviata ipp://till-lenovo.local:30466/printers/Mailand ipp://till-lenovo.local:30466/printers/Marrakech ipp://HPOccam.local:30466/ipp/printer ipp://till-lenovo.local:30466/printers/Paris ipp://till-lenovo.local:30466/printers/SanFrancisco ipp://till-lenovo.local:30466/printers/SanFranciscoFax ipp://till-lenovo.local:30466/printers/Santorini ipp://till-lenovo.local:30466/printers/Singapur ipp://till-lenovo.local:30466/printers/Tokyo ipp://till-lenovo.local:30466/printers/Wien ipp://NPI90E6C1.local:30466/NPI90E6C1

Quoted 4 lines

It should be port 631 and not 30466. Looks like an endian problem or so. I tested on an x86_64 system running Ubuntu Saucy.

Till

_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair

#2 lore raw

And the fix:

ippfind.c +1 -1
Index: test/ippfind.c
===================================================================
@@ -2618,7 +2618,7 @@
 
   service->is_resolved = 1;
   service->host        = strdup(hostTarget);
-  service->port        = ntohs(port);
+  service->port        = port;
 
  /*
   * Loop through the TXT key/value pairs and add them to an array...
Quoted 45 lines · Michael Sweet

Till,

Filed the following Apple bug to track this:

<rdar://problem/14508324> cups.org: ippfind endian issue on Linux/Avahi

I think this *is* just an endian issue, and it is limited to Avahi (strange I didn't notice it when I tested, but an easy fix)

Quoted 30 lines · Till Kamppeter

Hi,

I have packaged CUPS 1.7.0 RC1 for Ubuntu Raring (13.04) and Saucy (13.10) and uploaded them to my PPA
(https://launchpad.net/~till-kamppeter/+archive/ppa).

Then I have tested the new ippfind on Saucy by simply running

ippfind

The result is

ipp://till-lenovo.local:30466/printers/Berlin ipp://till-lenovo.local:30466/printers/Berlin ipp://till-lenovo.local:30466/printers/Berlin ipp://till-lenovo.local:30466/printers/Budapest ipp://till-lenovo.local:30466/printers/LaBoheme ipp://till-lenovo.local:30466/printers/LaTraviata ipp://till-lenovo.local:30466/printers/Mailand ipp://till-lenovo.local:30466/printers/Marrakech ipp://HPOccam.local:30466/ipp/printer ipp://till-lenovo.local:30466/printers/Paris ipp://till-lenovo.local:30466/printers/SanFrancisco ipp://till-lenovo.local:30466/printers/SanFranciscoFax ipp://till-lenovo.local:30466/printers/Santorini ipp://till-lenovo.local:30466/printers/Singapur ipp://till-lenovo.local:30466/printers/Tokyo ipp://till-lenovo.local:30466/printers/Wien ipp://NPI90E6C1.local:30466/NPI90E6C1

Quoted 4 lines

It should be port 631 and not 30466. Looks like an endian problem or so. I tested on an x86_64 system running Ubuntu Saucy.

Till

Quoted 7 lines

_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair

_______________________________________________
Printing-architecture mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/printing-architecture

_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair

#3 lore raw

Thank you very much. I have applied the patch and it works.

Till

Quoted 63 lines · Michael Sweet

And the fix:

Quoted 45 lines · Michael Sweet

Till,

Filed the following Apple bug to track this:

<rdar://problem/14508324> cups.org: ippfind endian issue on Linux/Avahi

I think this *is* just an endian issue, and it is limited to Avahi (strange I didn't notice it when I tested, but an easy fix)

Quoted 30 lines · Till Kamppeter

Hi,

I have packaged CUPS 1.7.0 RC1 for Ubuntu Raring (13.04) and Saucy (13.10) and uploaded them to my PPA
(https://launchpad.net/~till-kamppeter/+archive/ppa).

Then I have tested the new ippfind on Saucy by simply running

ippfind

The result is

ipp://till-lenovo.local:30466/printers/Berlin ipp://till-lenovo.local:30466/printers/Berlin ipp://till-lenovo.local:30466/printers/Berlin ipp://till-lenovo.local:30466/printers/Budapest ipp://till-lenovo.local:30466/printers/LaBoheme ipp://till-lenovo.local:30466/printers/LaTraviata ipp://till-lenovo.local:30466/printers/Mailand ipp://till-lenovo.local:30466/printers/Marrakech ipp://HPOccam.local:30466/ipp/printer ipp://till-lenovo.local:30466/printers/Paris ipp://till-lenovo.local:30466/printers/SanFrancisco ipp://till-lenovo.local:30466/printers/SanFranciscoFax ipp://till-lenovo.local:30466/printers/Santorini ipp://till-lenovo.local:30466/printers/Singapur ipp://till-lenovo.local:30466/printers/Tokyo ipp://till-lenovo.local:30466/printers/Wien ipp://NPI90E6C1.local:30466/NPI90E6C1

Quoted 4 lines

It should be port 631 and not 30466. Looks like an endian problem or so. I tested on an x86_64 system running Ubuntu Saucy.

Till

Quoted 7 lines

_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair

_______________________________________________
Printing-architecture mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/printing-architecture

_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair