Ticket #57 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

DNSServiceRegister() fails with NULL as callback

Reported by: olemd Owned by: lennart
Milestone: Avahi 0.6.13 Component: avahi-compat-libdns_sd
Keywords: Cc:

Description

The apple documentation states that :

callBack
    The function to be called when the registration completes or asynchronously 
    fails. The client MAY pass NULL for the callback - The client will NOT be 
    notified of the default values picked on its behalf, and the client will NOT be    
    notified of any asynchronous errors (e.g. out of memory errors, etc.) that may 
    prevent the registration of the service. The client may NOT pass the NoAutoRename
    flag if the callback is NULL. The client may still deregister the service at any 
    time via DNSServiceRefDeallocate().

However, if I do pass NULL as the argument - this is what happens:

*** WARNING *** The programme 'vncviewer' uses the Apple Bonjour compatiblity layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=vncviewer>
vncviewer: compat.c:986: DNSServiceRegister: Assertion `callback' failed.
Aborted

Change History

Changed 7 years ago by lennart

  • status changed from new to closed
  • resolution set to fixed

(In [1248]) allow passing NULL as callback function in DNSServiceRegister() as documented by Apple. (closes #57)

Changed 7 years ago by lennart

  • milestone set to Avahi 0.6.13
Note: See TracTickets for help on using tickets.