Matthew,

Thanks for your reply, I have build the latest revision from the repository.
At first it wouldn't compile(VS express 2008) due to this:
..\..\slpd\slpd_process.c(204) : error C2220: warning treated as error - 
no 'object' file generated
  ..\..\slpd\slpd_process.c(204) : warning C4018: '>' : signed/unsigned 
mismatch

Fixed this error with a small change:
Index: slpd_process.c
===================================================================
--- slpd_process.c    (revision 1688)
+++ slpd_process.c    (working copy)
@@ -201,7 +201,7 @@
            size_t currentPosFromStart = (*sendbuf)->curpos - 
(*sendbuf)->start;

            /* check to make sure we're growing by at least the size of 
the tmp buffer */
-          *sendbuf = SLPBufferRealloc( (*sendbuf), 
((*sendbuf)->allocated + ((tmp->end - tmp->start) > grow_size?(tmp->end 
- tmp->start):grow_size)) );
+          *sendbuf = SLPBufferRealloc( (*sendbuf), 
((*sendbuf)->allocated + ((size_t)(tmp->end - tmp->start) > 
grow_size?(tmp->end - tmp->start):grow_size)) );
            if (*sendbuf == 0)
            {
               retVal = SLP_ERROR_INTERNAL_ERROR;

When I add a server manually now with the slptool tool it continues to 
exist, however registering my own application still fails.

Regards,
Gerard

On 12/21/2011 03:50 PM, Hird Matthew wrote:
> Gerard
>
> I'm not sure why your windows version doesn't work but if you don't mind
> compiling from source, I would step up to the latest revision (1688) for
> both from the repository if I was you -
> http://sourceforge.net/scm/?type=svn&group_id=1730
>
> The problem you are having with services disappearing is because there is a
> pid watch facility enabled on the daemon. As soon as the pid disappears from
> the process table, any services associated with it are removed. You can
> either switch it off via the slp.conf file or step up to the latest revision
> as I believe somebody has put a patch in to stop this happening from
> slptool.
>
> cheers
> Matt
>
>
> -----Original Message-----
> From: Gerard van den Bosch [mailto:ger...@de-haardt.com]
> Sent: 21 December 2011 12:51
> To: openslp-users@lists.sourceforge.net
> Subject: [Openslp-users] OpenSLP windows problem
>
> Hello,
>
> I have made a server application in Qt, in order to automatically discover
> the server I've implemented code that talks with the OpenSLP API and
> registers the server. This code works fine on Linux but I am having troubles
> to get it running on Windows (XP).
>
> I have a small version difference, the version of SLPD on my Linux machine
> is 1.2.1 and the one on my Windows version is 2.0.0, I assumed the interface
> would stay the same so this wouldn't be a problem.
>
> On both OS's I compiled against SLP.h and on Linux linked with -lslp and
> with Windows I have linked against slp.dll.
>
> I have adapted the code from the openslp.org site, my code can be found
> here: http://pastebin.com/dak6YGnE
>
> The weird thing is also when I register a dummy service by hand with the
> slptool it disappears within a few seconds. I've also tried to run slpd.exe
> in debug mode but nothing showed up.
>
> Can anyone point me where this might be going wrong?
>
> Regards,
> Gerard
>
>
> ----------------------------------------------------------------------------
> --
> Write once. Port to many.
> Get the SDK and tools to simplify cross-platform app development. Create new
> or port existing apps to sell to consumers worldwide. Explore the Intel
> AppUpSM program developer opportunity. appdeveloper.intel.com/join
> http://p.sf.net/sfu/intel-appdev
> _______________________________________________
> Openslp-users mailing list
> Openslp-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openslp-users
>
> This email, including any attachment, is a confidential communication
> intended solely for the use of the individual or entity to whom it is
> addressed. It contains information which is private and may be proprietary
> or covered by legal professional privilege. If you have received this email
> in error, please notify the sender upon receipt, and immediately delete it
> from your system.
>
> Anything contained in this email that is not connected with the businesses
> of this company is neither endorsed by nor is the liability of this company.
>
> Whilst we have taken reasonable precautions to ensure that any attachment to
> this email has been swept for viruses, we cannot accept liability for any
> damage sustained as a result of software viruses, and would advise that you
> carry out your own virus checks before opening any attachment.
>



------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Openslp-users mailing list
Openslp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openslp-users

Reply via email to