[cups-devel] [UNKN] STR #4548: ippserver bad calling convention for dnssd.dll

Olivier Levon noreply at cups.org
Thu Dec 25 07:35:19 PST 2014


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

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

[STR New]

After patching ippserver for tmp file name on Windows (cf STR #4547, still
VC2015 latest code from repository, Bonjour support enabled), second run
gave me a dialog box with following error message : 

Debug Error!

Program: ...r-544_git - Copie\3rd party\cupsg\vcnet\Win32\Debug\dnssd.dll
Module: ...r-544_git - Copie\3rd party\cupsg\vcnet\Win32\Debug\dnssd.dll
File: c:\users\olivier\desktop\mdnsresponder-544_git -
copie\mdnsshared\dnssd_clientstub.c
Line: 1552

Run-Time Check Failure #0 - T

(Press Retry to debug the application)

Here is command line output from ippserver.exe :

C:\Users\Olivier\Desktop\mDNSResponder-544_git - Copie\3rd
party\cupsg\vcnet\Win32\Debug>ippserver.exe -v discus_cups201win32
Listening on port 8631.
Using spool directory
"C:\Users\Olivier\AppData\Local\Temp\\ippserver.6576".
printer-more-info="http://localhost:8631/"
printer-supply-info-uri="http://localhost:8631/supplies"
printer-uri="ipp://localhost:8631/ipp/print"

Trying to debug ippserver in VC 2015 (Press Retry to debug the application
from dialog box), I had this message :

Run-Time Check Failure #0 - The value of ESP was not properly saved across
a function call.  This is usually a result of calling a function declared
with one calling convention with a function pointer declared with a
different calling convention.


Digging into ippserver.c code, I found that you missed a DNSSD_API
declaration for dnssd_callback callback function (2 places ):

\test\ippserver.c(364):static void		dnssd_callback(DNSServiceRef sdRef,

and

\test\ippserver.c(2300 approx.):
#ifdef HAVE_DNSSD
/*
 * 'dnssd_callback()' - Handle Bonjour registration events.
 */

static void DNSSD_API
dnssd_callback(
    DNSServiceRef       sdRef,		/* I - Service reference */
    DNSServiceFlags     flags,		/* I - Status flags */
    DNSServiceErrorType errorCode,	/* I - Error, if any */
    const char          *name,		/* I - Service name */
    const char          *regtype,	/* I - Service type */
    const char          *domain,	/* I - Domain for service */
    _ipp_printer_t      *printer)	/* I - Printer */ 


Should be :

static void		DNSSD_API dnssd_callback(DNSServiceRef sdRef,
				       DNSServiceFlags flags,
				       DNSServiceErrorType errorCode,
				       const char *name,
				       const char *regtype,
				       const char *domain,
				       _ipp_printer_t *printer);

and

static void DNSSD_API
dnssd_callback(
    DNSServiceRef       sdRef,		/* I - Service reference */
    DNSServiceFlags     flags,		/* I - Status flags */
    DNSServiceErrorType errorCode,	/* I - Error, if any */
    const char          *name,		/* I - Service name */
    const char          *regtype,	/* I - Service type */
    const char          *domain,	/* I - Domain for service */
    _ipp_printer_t      *printer)	/* I - Printer */

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

iQIcBAEBCgAGBQJUnC63AAoJENujp6sI12IjV5kP/3GAe5UOuN0S5YFLFjImcJhU
Ng1zFubHovo0ztpC1T/kowR2yWLz1yw4ccjQ6jqDWrL62aEXfku1iqZP+i+RTwvI
CZd2Zguhod/lU3KjV/FKa4CZjlAJk/K1vPg62XSPPCmiACEj/g/nqLcCvtZNw5NS
zcn9c3/xXYfnh1ApYbIXF6y8gmF1pkjxXMeRJDiwo0MG6if4gRRDww0nOE+HZfhz
JdDRlVjorkHCpz0zru8lWNolHak3bgUvW5njUZKdFlnTgttq7lJAzeR3Pld+cGwH
OkL2Yny+PLZILtsFAlPwElWVTVRJ9ipLXC0GYeGZVo0N0df0HUvmHA8IsNiqbjHP
uVIrsG2AtE9jTajlQ4KbIV5biPm2kCu0JGwJVJlPHM86tdrYR+Eyx+LLwBO3v1Rk
Cb1K948HfFoDwXBqpo/+Uvl0r1ZGnCNutYMVcSERC1R/5pIsZrSQvX9MiQaJG0Kb
fSn1wCX4dlEZdXj/Q8azWacrh/JF6sOVaNwuMP4UxRvIuGIe9MsM8AUVZBAZ+j62
CSL40dmiTVQSG3Z3n0MTiAKuUT3A95vK9DxoBEeBjm7J1YmT6N/eGurwfz7WHTZk
beHVlHkBRjRjPDgEbOOWaKjxU0Cg2jqoZaxDC1qWl6ux5/6ZS3GOWkfONUvIlRtv
KdxRxq2qd1JDVLtL6b1Z
=+GpV
-----END PGP SIGNATURE-----




More information about the cups mailing list