Jim,

After thinking about it for a while, I realized why service registration 
with slptool shows up for a short time and then disappears. It's because 
I fixed the pid-watcher functionality a while back in the 2.0 source 
base. It was totally broken in 1.x.

According to the SLP spec, a UA registers its services with a timeout 
value. When the timeout expires, the local SA automatically expires the 
registration. I can't remember what the default timeout value is, but I 
think it's like 5 minutes. That means every 5 minutes, the UA is 
responsible for re-registering all of its advertised services.

Well, okay, not bad, but the pid-watcher extension was supposed to 
alleviate UAs of this chore by having the local SA watch the pids of all 
registering UAs. When a pid goes missing because the UA shut down or 
something, then the SA automatically deregisters the service during the 
next alarm signal handler (default, 5 second intervals).

This explains why slptool was failing to create a long-term registration 
- slptool only runs for as long as it takes to perform the operation. 
During the next alarm event, the SA terminates the registration because 
slptool's pid is gone.

To be clear, the system is working just fine. I'll look into how to get 
slptool to establish long-term registrations - probably just not use the 
pid-watcher functionality in slptool (the client can control whether 
pid-watcher extension is used with a flag on the slp handle it uses 
against the UA library).

John

jim marshall wrote:
> Hi John, et al...
>  I have compiled the latest svn tree on Solaris, the slpd program 
> appears to start however; when I try to use slptool it returns
>
> $ ./slptool register service:myserv.http://localhost "(attr1=val1)"
> errorcode: -19
>
> This is the same error that my service gets when it tries to register
>
> Debugging slptool it appears that slptool is successfully sending a 
> message via SLPNetworkSendMessage but when we go into 
> SLPNetworkRecvMessage the select call always returns 0.
>
> The only 'odd' thing I noticed is that that in 
> 'SLPNetworkCreateDatagram' the following call is made:
>
> 110              setsockopt(result, SOL_SOCKET, SO_RCVLOWAT,
> (gdb) n
> 112              setsockopt(result, SOL_SOCKET, SO_SNDLOWAT,
> (gdb) print errno
> $56 = 99
>
> as you can see the first setsockopt call is failing with errno set to 99 
> (Option not supported by protocol). Dunno if that means anything or not 
> (I presume not since there is no check for the setsockopt result).
>
> As an aside I am having a different issue on Windows:
>
> C:\bin>slptool register service:myserv.x://myhost.com 
> "(attr1=val1),(attr2=val2)"
> C:\bin>slptool findsrvs service:myserv.x
> C:\bin>slptool deregister service:myserv.x://myhost.com
> (de)registration errorcode -3
>
> It appears that the slpd on Windows is having a similar issue??
>
> Thoughts?
> Thanks
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Openslp-devel mailing list
> Openslp-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openslp-devel
>
>   


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Openslp-devel mailing list
Openslp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openslp-devel

Reply via email to