Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Browsing doesn't notice if a service unregisters/registers itself very quicky



Hi,

I use mDNSResponder 107.6, with some critical patches got at this mailing list.

If I deregister a service and right after that register it again but with different port, most likely observers won't notice that re-allocation.

E.g., using the example from mDNSResponder/Clients, dns-sd:

1. Launch browsing:
~> ./dns-sd -B _tttttt._tcp

2. Launch two consecutive registrations in another terminal:
~> cat RUN
#!/bin/sh

NAME=nnnnnn
TYPE=_tttttt._tcp
PORT1=9898
PORT2=9899

echo `date` "FIRST REGISTRATION"
./dns-sd -R $NAME $TYPE local $PORT1 &
pid=`ps auxww | grep $NAME | grep -v grep | awk '{print $2}'`
sleep 5
[ "X$pid" != "X" ] && kill -9 $pid

echo `date` "SECOND REGISTRATION"
./dns-sd -R $NAME $TYPE local $PORT2 &
pid=`ps auxww | grep $NAME | grep -v grep | awk '{print $2}'`
sleep 5
[ "X$pid" != "X" ] && kill -9 $pid

~> sh ./RUN


The output of the browing process:
Browsing for _tttttt._tcp
Timestamp A/R Flags if Domain Service Type Instance Name
15:49:47.634 Add 2 2 local. _tttttt._tcp. nnnnnn
15:49:57.861 Rmv 0 2 local. _tttttt._tcp. nnnnnn


The output of the registration process:
Mon Jan 29 15:49:46 MSK 2007 FIRST REGISTRATION
Registering Service nnnnnn._tttttt._tcp.local port 9898
Got a reply for nnnnnn._tttttt._tcp.local.: Name now registered and active
Mon Jan 29 15:49:51 MSK 2007 SECOND REGISTRATION
RUN2: line 15: 26517 Killed ./dns-sd -R $NAME $TYPE local $PORT1
Registering Service nnnnnn._tttttt._tcp.local port 9899
Got a reply for nnnnnn._tttttt._tcp.local.: Name now registered and active


Please, let me know if you know a fix for this issue.
As a workaround one should add a delay between two registration processes.

Kind regards,
Igor


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bonjour-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/bonjour-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.