Accepting request 709417 from network:utilities
- Explicitely require library on develpackage and do not pull in the base package with slptool binary (forwarded request 709401 from scarabeus_iv) OBS-URL: https://build.opensuse.org/request/show/709417 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/openslp?expand=0&rev=52
This commit is contained in:
commit
c6c4eefea1
@ -1,3 +1,40 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 12 11:32:40 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Explicitely require library on develpackage and do not pull
|
||||
in the base package with slptool binary
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jun 9 14:53:07 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Fixup summaries: SDK already includes "development",
|
||||
and shared library is unspecific. Remove marketing wording
|
||||
from descriptions.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 7 16:00:46 CEST 2019 - mls@suse.de
|
||||
|
||||
- Use tcp connects to talk with other DAs [bnc#1117969]
|
||||
new patch: openslp.tcpknownda.diff
|
||||
- Fix segfault in predicate match if a registered service has
|
||||
a malformed attribute list [bnc#1136136]
|
||||
new patch: openslp.nullattr.diff
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 6 16:17:45 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Remove < SLE12 as it is no longer supported
|
||||
- Remove obsolete conditions/etc.
|
||||
* dropped file: slpd.init
|
||||
- Cleanup with spec-cleaner
|
||||
- Split out shared library properly
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 6 09:31:19 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Drop the omc config fate#301838:
|
||||
* it is obsolete since SLE11
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 27 22:13:24 UTC 2018 - Jason Sikes <jsikes@suse.de>
|
||||
|
||||
|
13
openslp.nullattr.diff
Normal file
13
openslp.nullattr.diff
Normal file
@ -0,0 +1,13 @@
|
||||
--- slpd/slpd_predicate.c.orig 2019-06-06 14:12:09.025492155 +0000
|
||||
+++ slpd/slpd_predicate.c 2019-06-06 14:12:56.605386533 +0000
|
||||
@@ -2111,6 +2111,10 @@ int SLPDPredicateTestTree(SLPDPredicateT
|
||||
if (!parseTree)
|
||||
return 1;
|
||||
|
||||
+ /* a NULL set of attribures is always false */
|
||||
+ if (!slp_attr)
|
||||
+ return 0;
|
||||
+
|
||||
err = treeFilter(parseTree, slp_attr);
|
||||
|
||||
return (err == FR_EVAL_TRUE);
|
260
openslp.spec
260
openslp.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package openslp
|
||||
#
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -16,32 +16,19 @@
|
||||
#
|
||||
|
||||
|
||||
%define libname libslp1
|
||||
Name: openslp
|
||||
BuildRequires: bison
|
||||
BuildRequires: flex
|
||||
BuildRequires: libtool
|
||||
BuildRequires: openssl-devel
|
||||
%if 0%{?suse_version} > 1140
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: pkgconfig(libsystemd)
|
||||
BuildRequires: pkgconfig(systemd)
|
||||
%define has_systemd 1
|
||||
%endif
|
||||
Summary: An OpenSLP Implementation of Service Location Protocol V2
|
||||
License: BSD-3-Clause
|
||||
Group: System/Daemons
|
||||
Version: 2.0.0
|
||||
Release: 0
|
||||
Url: http://www.openslp.org/
|
||||
#
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Source0: http://sourceforge.net/projects/openslp/files/2.0.0/%{version}/%name-%version.tar.gz
|
||||
Source1: slpd.init
|
||||
Summary: An Implementation of Service Location Protocol V2
|
||||
License: BSD-3-Clause
|
||||
Group: System/Daemons
|
||||
URL: http://www.openslp.org/
|
||||
Source0: http://sourceforge.net/projects/openslp/files/2.0.0/%{version}/%{name}-%{version}.tar.gz
|
||||
Source2: README.SUSE
|
||||
Source3: openslp.desktop
|
||||
Source4: openslp-devel.desktop
|
||||
Source5: openslp.logrotate
|
||||
Source6: slpd.xml
|
||||
Source7: openslp.SuSEfirewall2
|
||||
Source8: baselibs.conf
|
||||
Source9: slpd.service
|
||||
@ -67,49 +54,66 @@ Patch18: openslp.openssl-1.1.diff
|
||||
Patch19: openslp.localaddr.diff
|
||||
Patch20: openslp.tcpunicast.diff
|
||||
Patch21: openslp-2.0.0-ifdef-slpv2.diff
|
||||
Patch22: openslp.tcpknownda.diff
|
||||
Patch23: openslp.nullattr.diff
|
||||
BuildRequires: bison
|
||||
BuildRequires: flex
|
||||
BuildRequires: libtool
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: pkgconfig(libsystemd)
|
||||
BuildRequires: pkgconfig(systemd)
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
|
||||
%description
|
||||
Service Location Protocol is an IETF standards track protocol that
|
||||
provides a framework that allows networking applications to discover
|
||||
the existence, location, and configuration of networked services in
|
||||
enterprise networks.
|
||||
networks.
|
||||
|
||||
OpenSLP is an open source implementation of the SLPv2 protocol as
|
||||
defined by RFC 2608 and RFC 2614. This package includes the slptool
|
||||
and runtime libraries.
|
||||
|
||||
%package server
|
||||
Summary: The OpenSLP Implementation of the Service Location Protocol V2
|
||||
Summary: The OpenSLP Implementation of the Service Location Protocol V2
|
||||
Group: System/Daemons
|
||||
PreReq: /usr/sbin/useradd
|
||||
%if 0%{?has_systemd}
|
||||
%{?systemd_requires}
|
||||
%else
|
||||
PreReq: %fillup_prereq %insserv_prereq
|
||||
%endif
|
||||
Requires(pre): group(daemon)
|
||||
Requires(pre): shadow
|
||||
Recommends: logrotate
|
||||
%{?systemd_requires}
|
||||
|
||||
%description server
|
||||
Service Location Protocol is an IETF standards track protocol that
|
||||
provides a framework that allows networking applications to discover
|
||||
the existence, location, and configuration of networked services in
|
||||
enterprise networks.
|
||||
networks.
|
||||
|
||||
This package contains the SLP server. Every system, which provides any
|
||||
services that should be used via an SLP client must run this server and
|
||||
register the service.
|
||||
|
||||
%package -n %{libname}
|
||||
Summary: An Implementation of the Service Location Protocol V2
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n %{libname}
|
||||
Service Location Protocol is an IETF standards track protocol that
|
||||
provides a framework that allows networking applications to discover
|
||||
the existence, location, and configuration of networked services in
|
||||
networks.
|
||||
|
||||
%package devel
|
||||
Requires: openslp = %version
|
||||
Summary: Header files for OpenSLP
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: %{libname} = %{version}
|
||||
Requires: openssl-devel
|
||||
Summary: OpenSLP Development SDK
|
||||
Group: System/Daemons
|
||||
|
||||
%description devel
|
||||
Service Location Protocol is an IETF standards track protocol that
|
||||
provides a framework that allows networking applications to discover
|
||||
the existence, location, and configuration of networked services in
|
||||
enterprise networks.
|
||||
networks.
|
||||
|
||||
This package contains header and library files to compile applications
|
||||
with SLP support. It also contains developer documentation to develop
|
||||
@ -128,9 +132,7 @@ such applications.
|
||||
%patch9
|
||||
%patch10
|
||||
%patch11
|
||||
%if 0%{?has_systemd}
|
||||
%patch12
|
||||
%endif
|
||||
%patch13
|
||||
%patch14
|
||||
%patch15
|
||||
@ -140,157 +142,117 @@ such applications.
|
||||
%patch19
|
||||
%patch20
|
||||
%patch21 -p1
|
||||
%patch22
|
||||
%patch23
|
||||
|
||||
%build
|
||||
autoreconf -fiv
|
||||
%configure --disable-static --with-pic --enable-slpv1 \
|
||||
%configure \
|
||||
--disable-static \
|
||||
--with-pic \
|
||||
--enable-slpv1 \
|
||||
--enable-async-api \
|
||||
--enable-slpv2-security
|
||||
%{__make} %{?jobs:-j%jobs}
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
mkdir -p ${RPM_BUILD_ROOT}/etc/slp.reg.d
|
||||
mkdir -p ${RPM_BUILD_ROOT}/etc/slp.reg.d/slpd
|
||||
cp etc/slp.conf ${RPM_BUILD_ROOT}/etc
|
||||
cp etc/slp.reg ${RPM_BUILD_ROOT}/etc
|
||||
cp etc/slp.spi ${RPM_BUILD_ROOT}/etc
|
||||
mkdir -p ${RPM_BUILD_ROOT}/%_libdir
|
||||
./libtool --mode=install install libslp/libslp.la ${RPM_BUILD_ROOT}/%_libdir
|
||||
mkdir -p ${RPM_BUILD_ROOT}/usr/sbin
|
||||
./libtool --mode=install install slpd/slpd ${RPM_BUILD_ROOT}/usr/sbin
|
||||
mkdir -p ${RPM_BUILD_ROOT}/usr/bin
|
||||
./libtool --mode=install install slptool/slptool ${RPM_BUILD_ROOT}/usr/bin
|
||||
mkdir -p ${RPM_BUILD_ROOT}/usr/include
|
||||
cp libslp/slp.h ${RPM_BUILD_ROOT}/usr/include
|
||||
mkdir -p ${RPM_BUILD_ROOT}%_defaultdocdir/%name
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/slp.reg.d
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/slp.reg.d/slpd
|
||||
cp etc/slp.conf %{buildroot}%{_sysconfdir}
|
||||
cp etc/slp.reg %{buildroot}%{_sysconfdir}
|
||||
cp etc/slp.spi %{buildroot}%{_sysconfdir}
|
||||
mkdir -p %{buildroot}/%{_libdir}
|
||||
./libtool --mode=install install libslp/libslp.la %{buildroot}/%{_libdir}
|
||||
rm %{buildroot}%{_libdir}/libslp.la
|
||||
mkdir -p %{buildroot}%{_sbindir}
|
||||
./libtool --mode=install install slpd/slpd %{buildroot}%{_sbindir}
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
./libtool --mode=install install slptool/slptool %{buildroot}%{_bindir}
|
||||
mkdir -p %{buildroot}%{_includedir}
|
||||
cp libslp/slp.h %{buildroot}%{_includedir}
|
||||
mkdir -p %{buildroot}%{_defaultdocdir}/%{name}
|
||||
find . -name CVS -o -name .cvsignore -o -name .xvpics | xargs rm -rf
|
||||
cp -a AUTHORS README FAQ doc/doc/rfc doc/doc/html %SOURCE2 \
|
||||
${RPM_BUILD_ROOT}%_defaultdocdir/%name
|
||||
%if 0%{?has_systemd}
|
||||
ln -s %{_sbindir}/service ${RPM_BUILD_ROOT}/usr/sbin/rcslpd
|
||||
cat > ${RPM_BUILD_ROOT}/usr/sbin/rcopenslp <<'EOF'
|
||||
cp -a AUTHORS README FAQ doc/doc/rfc doc/doc/html %{SOURCE2} \
|
||||
%{buildroot}%{_defaultdocdir}/%{name}
|
||||
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcslpd
|
||||
cat > %{buildroot}%{_sbindir}/rcopenslp <<'EOF'
|
||||
#!/bin/sh
|
||||
exec /usr/sbin/rcslpd "$@"
|
||||
exec %{_sbindir}/rcslpd "$@"
|
||||
EOF
|
||||
chmod 755 ${RPM_BUILD_ROOT}/usr/sbin/rcopenslp
|
||||
install -D -m 0644 %{SOURCE10} ${RPM_BUILD_ROOT}/etc/logrotate.d/openslp-server
|
||||
%else
|
||||
mkdir -p ${RPM_BUILD_ROOT}/etc/init.d/
|
||||
install -m 755 %{SOURCE1} ${RPM_BUILD_ROOT}/etc/init.d/slpd
|
||||
ln -sf ../../etc/init.d/slpd ${RPM_BUILD_ROOT}/usr/sbin/rcslpd
|
||||
ln -sf ../../etc/init.d/slpd ${RPM_BUILD_ROOT}/usr/sbin/rcopenslp
|
||||
install -D -m 0644 %{SOURCE5} ${RPM_BUILD_ROOT}/etc/logrotate.d/openslp-server
|
||||
%endif
|
||||
chmod 755 %{buildroot}%{_sbindir}/rcopenslp
|
||||
install -D -m 0644 %{SOURCE10} %{buildroot}%{_sysconfdir}/logrotate.d/openslp-server
|
||||
# install susehelp file
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/share/susehelp/meta/Administration/
|
||||
install -m 0644 %SOURCE3 \
|
||||
$RPM_BUILD_ROOT/usr/share/susehelp/meta/Administration/
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/share/susehelp/meta/Development/Libraries/
|
||||
install -m 0644 %SOURCE4 \
|
||||
$RPM_BUILD_ROOT/usr/share/susehelp/meta/Development/Libraries/
|
||||
install -d -m 755 $RPM_BUILD_ROOT/usr/share/omc/svcinfo.d
|
||||
install -m 0644 %SOURCE6 $RPM_BUILD_ROOT/usr/share/omc/svcinfo.d
|
||||
%if 0
|
||||
# actually, these files should get translated, but do we really want to
|
||||
# add update-desktop-files to needed_for_build ?
|
||||
%suse_update_desktop_file $RPM_BUILD_ROOT/usr/share/susehelp/meta/Administration/openslp.desktop
|
||||
%suse_update_desktop_file $RPM_BUILD_ROOT/usr/share/susehelp/meta/Development/Libraries/openslp-devel.desktop
|
||||
%endif
|
||||
%{__rm} -f %{buildroot}%{_libdir}/*.la
|
||||
%if 0%{?suse_version}
|
||||
install -D -m 644 %{S:7} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/openslp
|
||||
%endif
|
||||
mkdir -p %{buildroot}%{_datadir}/susehelp/meta/Administration/
|
||||
install -m 0644 %{SOURCE3} \
|
||||
%{buildroot}%{_datadir}/susehelp/meta/Administration/
|
||||
mkdir -p %{buildroot}%{_datadir}/susehelp/meta/Development/Libraries/
|
||||
install -m 0644 %{SOURCE4} \
|
||||
%{buildroot}%{_datadir}/susehelp/meta/Development/Libraries/
|
||||
install -D -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/openslp
|
||||
|
||||
%if 0%{?has_systemd}
|
||||
install -D -m 644 %{S:9} %{buildroot}%{_unitdir}/slpd.service
|
||||
%endif
|
||||
install -D -m 644 %{SOURCE9} %{buildroot}%{_unitdir}/slpd.service
|
||||
|
||||
#XXX test suite requires root
|
||||
#check
|
||||
#make check
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%post -n %{libname} -p /sbin/ldconfig
|
||||
%postun -n %{libname} -p /sbin/ldconfig
|
||||
%pre server
|
||||
/usr/sbin/useradd -r -g daemon -d /var/lib/empty -s /sbin/nologin -c "openslp daemon" openslp 2>/dev/null || :
|
||||
%if 0%{?has_systemd}
|
||||
getent passwd openslp >/dev/null || useradd -r -g daemon -d %{_localstatedir}/lib/empty -s /sbin/nologin -c "openslp daemon" openslp
|
||||
%service_add_pre slpd.service
|
||||
%endif
|
||||
|
||||
%post server
|
||||
%if 0%{?has_systemd}
|
||||
%service_add_post slpd.service
|
||||
%else
|
||||
%{fillup_and_insserv slpd}
|
||||
%endif
|
||||
|
||||
%postun server
|
||||
%if 0%{?has_systemd}
|
||||
%service_del_postun slpd.service
|
||||
%else
|
||||
%restart_on_update slpd
|
||||
%insserv_cleanup
|
||||
%endif
|
||||
|
||||
%preun server
|
||||
%if 0%{?has_systemd}
|
||||
%service_del_preun slpd.service
|
||||
%else
|
||||
%stop_on_removal slpd
|
||||
%endif
|
||||
|
||||
%files -n %{libname}
|
||||
%{_libdir}/libslp.so.*
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%license COPYING
|
||||
%dir %_defaultdocdir/%name
|
||||
%dir %_defaultdocdir/%name/html
|
||||
%doc %_defaultdocdir/%name/AUTHORS
|
||||
%doc %_defaultdocdir/%name/README
|
||||
%doc %_defaultdocdir/%name/README.SUSE
|
||||
%_libdir/libslp.so.*
|
||||
%dir %{_defaultdocdir}/%{name}
|
||||
%dir %{_defaultdocdir}/%{name}/html
|
||||
%doc %{_defaultdocdir}/%{name}/AUTHORS
|
||||
%doc %{_defaultdocdir}/%{name}/README
|
||||
%doc %{_defaultdocdir}/%{name}/README.SUSE
|
||||
%{_bindir}/slptool
|
||||
%config(noreplace) /etc/slp.conf
|
||||
%config(noreplace) /etc/slp.spi
|
||||
%config(noreplace) %{_sysconfdir}/slp.conf
|
||||
%config(noreplace) %{_sysconfdir}/slp.spi
|
||||
|
||||
%files server
|
||||
%defattr(-,root,root)
|
||||
%dir /usr/share/susehelp
|
||||
%dir /usr/share/susehelp/meta
|
||||
%dir /usr/share/susehelp/meta/Administration
|
||||
%doc %_defaultdocdir/%name/FAQ
|
||||
%doc %_defaultdocdir/%name/html/IntroductionToSLP
|
||||
%doc %_defaultdocdir/%name/html/UsersGuide
|
||||
%doc %_defaultdocdir/%name/html/faq.html
|
||||
%doc %_defaultdocdir/%name/rfc
|
||||
%doc /usr/share/susehelp/meta/Administration/openslp.desktop
|
||||
%dir /etc/slp.reg.d/
|
||||
%dir /etc/slp.reg.d/slpd
|
||||
/usr/sbin/rcopenslp
|
||||
/usr/sbin/rcslpd
|
||||
/usr/sbin/slpd
|
||||
%config(noreplace) /etc/slp.reg
|
||||
%config(noreplace) /etc/logrotate.d/openslp-server
|
||||
/usr/share/omc/svcinfo.d/slpd.xml
|
||||
%if 0%{?suse_version} > 0
|
||||
%dir %{_datadir}/susehelp
|
||||
%dir %{_datadir}/susehelp/meta
|
||||
%dir %{_datadir}/susehelp/meta/Administration
|
||||
%doc %{_defaultdocdir}/%{name}/FAQ
|
||||
%doc %{_defaultdocdir}/%{name}/html/IntroductionToSLP
|
||||
%doc %{_defaultdocdir}/%{name}/html/UsersGuide
|
||||
%doc %{_defaultdocdir}/%{name}/html/faq.html
|
||||
%doc %{_defaultdocdir}/%{name}/rfc
|
||||
%doc %{_datadir}/susehelp/meta/Administration/openslp.desktop
|
||||
%dir %{_sysconfdir}/slp.reg.d/
|
||||
%dir %{_sysconfdir}/slp.reg.d/slpd
|
||||
%{_sbindir}/rcopenslp
|
||||
%{_sbindir}/rcslpd
|
||||
%{_sbindir}/slpd
|
||||
%config(noreplace) %{_sysconfdir}/slp.reg
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/openslp-server
|
||||
%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/openslp
|
||||
%endif
|
||||
%if 0%{?has_systemd}
|
||||
%{_unitdir}/slpd.service
|
||||
%else
|
||||
%config /etc/init.d/slpd
|
||||
%endif
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%dir /usr/share/susehelp
|
||||
%dir /usr/share/susehelp/meta
|
||||
%dir /usr/share/susehelp/meta/Development
|
||||
%dir /usr/share/susehelp/meta/Development/Libraries
|
||||
%doc %_defaultdocdir/%name/html/ProgrammersGuide
|
||||
%doc /usr/share/susehelp/meta/Development/Libraries/openslp-devel.desktop
|
||||
/usr/include/slp.h
|
||||
%_libdir/libslp.so
|
||||
%dir %{_datadir}/susehelp
|
||||
%dir %{_datadir}/susehelp/meta
|
||||
%dir %{_datadir}/susehelp/meta/Development
|
||||
%dir %{_datadir}/susehelp/meta/Development/Libraries
|
||||
%doc %{_defaultdocdir}/%{name}/html/ProgrammersGuide
|
||||
%doc %{_datadir}/susehelp/meta/Development/Libraries/openslp-devel.desktop
|
||||
%{_includedir}/slp.h
|
||||
%{_libdir}/libslp.so
|
||||
|
||||
%changelog
|
||||
|
94
openslp.tcpknownda.diff
Normal file
94
openslp.tcpknownda.diff
Normal file
@ -0,0 +1,94 @@
|
||||
--- slpd/slpd_knownda.c.orig 2018-12-06 14:03:06.033908426 +0000
|
||||
+++ slpd/slpd_knownda.c 2018-12-06 14:12:30.448421700 +0000
|
||||
@@ -261,7 +261,7 @@ void SLPDKnownDARegisterAll(SLPMessage *
|
||||
/*----------------------------------------------*/
|
||||
/* Establish a new connection with the known DA */
|
||||
/*----------------------------------------------*/
|
||||
- sock = SLPDOutgoingConnect(0, &(daadvert->peer));
|
||||
+ sock = SLPDOutgoingConnect(1, &(daadvert->peer));
|
||||
if (sock)
|
||||
while (1)
|
||||
{
|
||||
@@ -294,7 +294,8 @@ void SLPDKnownDARegisterAll(SLPMessage *
|
||||
/* link newly constructed buffer to socket resendlist, and send */
|
||||
/*--------------------------------------------------------------*/
|
||||
SLPListLinkTail(&(sock->sendlist), (SLPListItem *) sendbuf);
|
||||
- SLPDOutgoingDatagramWrite(sock, sendbuf);
|
||||
+ if (sock->state == STREAM_CONNECT_IDLE)
|
||||
+ sock->state = STREAM_WRITE_FIRST;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -433,7 +434,7 @@ void SLPDKnownDADeregisterAll(SLPMessage
|
||||
return;
|
||||
|
||||
/* Establish a new connection with the known DA */
|
||||
- sock = SLPDOutgoingConnect(0, &(daadvert->peer));
|
||||
+ sock = SLPDOutgoingConnect(1, &(daadvert->peer));
|
||||
if (sock)
|
||||
while (1)
|
||||
{
|
||||
@@ -459,7 +460,8 @@ void SLPDKnownDADeregisterAll(SLPMessage
|
||||
/* link newly constructed buffer to socket resendlist, and send */
|
||||
/*--------------------------------------------------------------*/
|
||||
SLPListLinkTail(&(sock->sendlist), (SLPListItem *) sendbuf);
|
||||
- SLPDOutgoingDatagramWrite(sock, sendbuf);
|
||||
+ if (sock->state == STREAM_CONNECT_IDLE)
|
||||
+ sock->state = STREAM_WRITE_FIRST;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -502,14 +504,15 @@ int SLPDKnownDAFromDHCP()
|
||||
Get an outgoing socket to the DA and set it up to make
|
||||
the service:directoryagent request
|
||||
--------------------------------------------------------*/
|
||||
- sock = SLPDOutgoingConnect(0, &daaddr);
|
||||
+ sock = SLPDOutgoingConnect(1, &daaddr);
|
||||
if (sock)
|
||||
{
|
||||
buf = 0;
|
||||
if (MakeActiveDiscoveryRqst(0, &buf) == 0)
|
||||
{
|
||||
SLPListLinkTail(&(sock->sendlist), (SLPListItem *) buf);
|
||||
- SLPDOutgoingDatagramWrite(sock, buf);
|
||||
+ if (sock->state == STREAM_CONNECT_IDLE)
|
||||
+ sock->state = STREAM_WRITE_FIRST;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -601,14 +604,15 @@ int SLPKnownDAFromProperties()
|
||||
/* Get an outgoing socket to the DA and set it up to make */
|
||||
/* the service:directoryagent request */
|
||||
/*--------------------------------------------------------*/
|
||||
- sock = SLPDOutgoingConnect(0, &daaddr);
|
||||
+ sock = SLPDOutgoingConnect(1, &daaddr);
|
||||
if (sock)
|
||||
{
|
||||
buf = 0;
|
||||
if (MakeActiveDiscoveryRqst(0, &buf) == 0)
|
||||
{
|
||||
SLPListLinkTail(&(sock->sendlist), (SLPListItem *) buf);
|
||||
- SLPDOutgoingDatagramWrite(sock, buf);
|
||||
+ if (sock->state == STREAM_CONNECT_IDLE)
|
||||
+ sock->state = STREAM_WRITE_FIRST;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1470,14 +1474,15 @@ void SLPDKnownDAEcho(SLPMessage * msg, S
|
||||
/*------------------------------------------*/
|
||||
/* Load the socket with the message to send */
|
||||
/*------------------------------------------*/
|
||||
- sock = SLPDOutgoingConnect(0, &(entry->msg->peer));
|
||||
+ sock = SLPDOutgoingConnect(1, &(entry->msg->peer));
|
||||
if (sock)
|
||||
{
|
||||
dup = SLPBufferDup(buf);
|
||||
if (dup)
|
||||
{
|
||||
SLPListLinkTail(&(sock->sendlist), (SLPListItem *) dup);
|
||||
- SLPDOutgoingDatagramWrite(sock, buf);
|
||||
+ if (sock->state == STREAM_CONNECT_IDLE)
|
||||
+ sock->state = STREAM_WRITE_FIRST;
|
||||
}
|
||||
else
|
||||
sock->state = SOCKET_CLOSE;
|
72
slpd.init
72
slpd.init
@ -1,72 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Copyright (c) 2003 SuSE AG Nuernberg, Germany.
|
||||
#
|
||||
# Author: adrian@suse.de, based on template from source package
|
||||
#
|
||||
# /etc/init.d/slpd
|
||||
# and its symbolic link
|
||||
# /usr/sbin/rcslpd
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: openslp slpd
|
||||
# Required-Start: $network $remote_fs $named
|
||||
# Required-Stop: $remote_fs
|
||||
# Default-Start: 3 5
|
||||
# Default-Stop: 0 1 2 4 6
|
||||
# Description: slpd - OpenSLP daemon for the Service Location Protocol
|
||||
### END INIT INFO
|
||||
|
||||
. /etc/rc.status
|
||||
|
||||
# Determine the base and follow a runlevel link name.
|
||||
base=${0##*/}
|
||||
link=${base#*[SK][0-9][0-9]}
|
||||
|
||||
# Force execution if not called by a runlevel directory.
|
||||
test -x /usr/sbin/slpd || exit 0
|
||||
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n 'Starting slpd '
|
||||
startproc /usr/sbin/slpd
|
||||
rc_status -v
|
||||
;;
|
||||
stop)
|
||||
echo -n "Shutting down slpd "
|
||||
killproc -TERM /usr/sbin/slpd
|
||||
rc_status -v
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
rc_status
|
||||
;;
|
||||
try-restart)
|
||||
$0 status
|
||||
if test $? = 0; then
|
||||
$0 restart
|
||||
else
|
||||
rc_reset
|
||||
fi
|
||||
rc_status
|
||||
;;
|
||||
force-reload)
|
||||
$0 stop; sleep 1 && $0 start
|
||||
rc_status
|
||||
;;
|
||||
reload)
|
||||
echo -n "Reload service slpd "
|
||||
killproc -HUP /usr/sbin/slpd
|
||||
rc_status -v
|
||||
;;
|
||||
status)
|
||||
echo -n "Checking for slpd "
|
||||
checkproc /usr/sbin/slpd
|
||||
rc_status -v
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|try-restart|restart|force-reload|reload|status}"
|
||||
exit 1
|
||||
esac
|
||||
rc_exit
|
89
slpd.xml
89
slpd.xml
@ -1,89 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
Copyright (c) 2006 Novell, Inc. All rights reserved.
|
||||
|
||||
|
||||
Service Description XML Document for slpd.
|
||||
|
||||
This file should be placed in /etc/omc/svcinfo.d
|
||||
|
||||
Note: The name of the service is the name of this file without the .xml
|
||||
file extension.
|
||||
-->
|
||||
|
||||
<serviceDescription version="1.0">
|
||||
|
||||
<!-- Caption for display purposes -->
|
||||
<caption>SLP Server</caption>
|
||||
|
||||
<!-- Description of this service -->
|
||||
<description>
|
||||
SLP Server Provides slpd and Openslp
|
||||
</description>
|
||||
|
||||
|
||||
<!--
|
||||
The startCommand tag specifies the command line that will be
|
||||
invoked to start the service. The return code from this command
|
||||
must be as follows:
|
||||
0 - success
|
||||
1 - generic or unspecified error
|
||||
2 - invalid or excess argument(s)
|
||||
3 - unimplemented feature (e.g. "reload")
|
||||
4 - user had insufficient privileges
|
||||
5 - program is not installed
|
||||
6 - program is not configured
|
||||
7 - program is not running
|
||||
-->
|
||||
<startCommand>/usr/sbin/rcslpd start</startCommand>
|
||||
|
||||
<!--
|
||||
The reStartCommand tag specifies the command line that will be
|
||||
invoked to restart the service. The return code from this command
|
||||
must be as specified in the startCommand tag.
|
||||
-->
|
||||
<reStartCommand>/usr/sbin/rcslpd restart</reStartCommand>
|
||||
|
||||
<!--
|
||||
The stopCommand tag specifies the command line that will be
|
||||
invoked to stop the service. The return code from this command
|
||||
must be as specified in the startCommand tag.
|
||||
-->
|
||||
<stopCommand>/usr/sbin/rcslpd stop</stopCommand>
|
||||
|
||||
<!--
|
||||
The statusCommand specifies the command line that can be run
|
||||
that will report on the status of the service. The return code
|
||||
from this command line should be as follows:
|
||||
0 - service up and running
|
||||
1 - service dead, but /var/run/ pid file exists
|
||||
2 - service dead, but /var/lock/ lock file exists
|
||||
3 - service not running (unused)
|
||||
4 - service status unknown :-(
|
||||
-->
|
||||
<statusCommand>/usr/sbin/rcslpd status</statusCommand>
|
||||
<!--
|
||||
The processInformation tag allows the XML Service provider to
|
||||
identify the processes that belong to the service. This allows
|
||||
the ServiceProcess associations to be instrumented.
|
||||
If the process_information tag is not specifed, the will be no
|
||||
ServiceProcess association for the service.
|
||||
-->
|
||||
|
||||
<processInformation>
|
||||
<name>slpd</name>
|
||||
<modulePath>/usr/sbin/slpd</modulePath>
|
||||
</processInformation>
|
||||
|
||||
<!--
|
||||
Define the services that this service has a dependency on.
|
||||
There must be a corresponding Service Description XML file
|
||||
for the antecedent service in the /etc/omc/svcinfo.d directory.
|
||||
-->
|
||||
<dependsOn>
|
||||
<serviceName>network</serviceName>
|
||||
<serviceName>named</serviceName>
|
||||
</dependsOn>
|
||||
|
||||
|
||||
</serviceDescription>
|
Loading…
x
Reference in New Issue
Block a user