Hello All,
I've read the config file under /etc/slp.conf.
Inside it, there is a section
;net.slp.watchRegistrationPID = false

I think this is about the openslp watching on the services (or process, i.e. 
sshd, ftpd) in SA.
And if the running services is down, or the pid disappears, SA will know that, 
and automatically dereg that service out from itself.
Am I right?

If I'm right. I've traced into the code at ./libslp/Libslp_reg.c in line 255.

******************************************************************************
    if(SLPPropertyAsBoolean(SLPGetProperty("net.slp.watchRegistrationPID")))
    {
        extoffset = curpos - buf;
        ToUINT16(curpos,SLP_EXTENSION_ID_REG_PID);
        curpos += 2;
        ToUINT24(curpos,0);
        curpos += 3;
        ToUINT32(curpos,SLPPidGet());
        curpos += 4;
    }
******************************************************************************
It seems that slpd will get the pid of something.
Normally, it's its own pid, if I didn't miss something.
I also added an printf after it, like this,
printf("pid is : %d\n",*curpos);
But the output is alway 0.

I did the same thing before there a little bit, and I can get the service name.
But the pid is alway 0.

The problem is, 
1. Does the OpenSLP implement the PID watching? The SLPPidGet seems only get 
pid of slpd.......
2. When the service process disappears, if OpenSLP can know that?
3. Do I need to notice OpenSLP the pid of a specific service? How to do....... 
Or only the name is enough.

Thanks a lot for any response!

Best
Patrick & Sha
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Openslp-devel mailing list
Openslp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openslp-devel

Reply via email to