- fix bug in openslp.initda.diff patch

OBS-URL: https://build.opensuse.org/package/show/network:utilities/openslp?expand=0&rev=41
This commit is contained in:
Michael Schröder 2016-09-13 10:59:46 +00:00 committed by Git OBS Bridge
parent d49686d237
commit 80f20282c9
2 changed files with 34 additions and 28 deletions

View File

@ -9,6 +9,7 @@ Mon Sep 12 14:23:15 CEST 2016 - mls@suse.de
new patch: openslp.predicatestorage.diff new patch: openslp.predicatestorage.diff
- bring back allowDoubleEqualInPredicate option - bring back allowDoubleEqualInPredicate option
new patch: openslp.doubleequal.diff new patch: openslp.doubleequal.diff
- fix bug in openslp.initda.diff patch
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Mar 8 00:39:27 UTC 2015 - p.drouand@gmail.com Sun Mar 8 00:39:27 UTC 2015 - p.drouand@gmail.com

View File

@ -1,5 +1,5 @@
--- ./common/slp_message.h.orig 2014-02-19 18:05:26.154934647 +0000 --- ./common/slp_message.h.orig 2016-09-13 10:56:06.324486007 +0000
+++ ./common/slp_message.h 2014-02-19 18:05:31.755934637 +0000 +++ ./common/slp_message.h 2016-09-13 10:56:14.214459554 +0000
@@ -126,6 +126,7 @@ @@ -126,6 +126,7 @@
#define SLP_REG_SOURCE_REMOTE 1 /* from a remote host */ #define SLP_REG_SOURCE_REMOTE 1 /* from a remote host */
#define SLP_REG_SOURCE_LOCAL 2 /* from localhost or IPC */ #define SLP_REG_SOURCE_LOCAL 2 /* from localhost or IPC */
@ -8,8 +8,8 @@
#define SLP_REG_WATCH_TCP (1<<0) #define SLP_REG_WATCH_TCP (1<<0)
#define SLP_REG_WATCH_UDP (1<<1) #define SLP_REG_WATCH_UDP (1<<1)
--- ./common/slp_property.c.orig 2014-02-19 18:05:26.154934647 +0000 --- ./common/slp_property.c.orig 2016-09-13 10:56:06.324486007 +0000
+++ ./common/slp_property.c 2014-02-19 18:05:31.755934637 +0000 +++ ./common/slp_property.c 2016-09-13 10:56:14.215459551 +0000
@@ -176,6 +176,11 @@ static int SetDefaultValues(void) @@ -176,6 +176,11 @@ static int SetDefaultValues(void)
/* Additional properties that are specific to IPv6 */ /* Additional properties that are specific to IPv6 */
{"net.slp.useIPv6", "false", 0}, {"net.slp.useIPv6", "false", 0},
@ -23,7 +23,7 @@
int i; int i;
--- ./etc/slp.conf.orig 2012-11-28 17:07:04.000000000 +0000 --- ./etc/slp.conf.orig 2012-11-28 17:07:04.000000000 +0000
+++ ./etc/slp.conf 2014-02-19 18:05:31.756934637 +0000 +++ ./etc/slp.conf 2016-09-13 10:56:14.215459551 +0000
@@ -23,6 +23,20 @@ @@ -23,6 +23,20 @@
# which DAs to use. (Default is to use dynamic DA discovery) # which DAs to use. (Default is to use dynamic DA discovery)
;net.slp.DAAddresses = myDa1,myDa2,myDa3 ;net.slp.DAAddresses = myDa1,myDa2,myDa3
@ -46,7 +46,7 @@
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# DA Specific Configuration # DA Specific Configuration
--- ./slpd/Makefile.am.orig 2012-11-28 17:07:04.000000000 +0000 --- ./slpd/Makefile.am.orig 2012-11-28 17:07:04.000000000 +0000
+++ ./slpd/Makefile.am 2014-02-19 18:05:31.756934637 +0000 +++ ./slpd/Makefile.am 2016-09-13 10:56:14.216459548 +0000
@@ -73,7 +73,8 @@ slpd_SOURCES = \ @@ -73,7 +73,8 @@ slpd_SOURCES = \
slpd_property.c \ slpd_property.c \
slpd_regfile.c \ slpd_regfile.c \
@ -67,8 +67,8 @@
#if you're building on Irix, replace .la with .a below #if you're building on Irix, replace .la with .a below
slpd_LDADD = ../common/libcommonslpd.la ../libslpattr/libslpattr.la slpd_LDADD = ../common/libcommonslpd.la ../libslpattr/libslpattr.la
--- ./slpd/slpd_database.c.orig 2014-02-19 18:05:26.161934647 +0000 --- ./slpd/slpd_database.c.orig 2016-09-13 10:56:06.332485980 +0000
+++ ./slpd/slpd_database.c 2014-02-19 18:05:55.042934596 +0000 +++ ./slpd/slpd_database.c 2016-09-13 10:56:14.217459544 +0000
@@ -50,6 +50,7 @@ @@ -50,6 +50,7 @@
#define _GNU_SOURCE #define _GNU_SOURCE
#include <string.h> #include <string.h>
@ -245,8 +245,8 @@
#ifdef DEBUG #ifdef DEBUG
/** Cleans up all resources used by the database. /** Cleans up all resources used by the database.
*/ */
--- ./slpd/slpd_database.h.orig 2014-02-19 18:05:26.155934647 +0000 --- ./slpd/slpd_database.h.orig 2016-09-13 10:56:06.326486000 +0000
+++ ./slpd/slpd_database.h 2014-02-19 18:05:31.758934637 +0000 +++ ./slpd/slpd_database.h 2016-09-13 10:56:14.217459544 +0000
@@ -105,7 +105,8 @@ int SLPDDatabaseIsEmpty(void); @@ -105,7 +105,8 @@ int SLPDDatabaseIsEmpty(void);
int SLPDDatabaseInit(const char * regfile); int SLPDDatabaseInit(const char * regfile);
int SLPDDatabaseReInit(); int SLPDDatabaseReInit();
@ -257,8 +257,8 @@
#ifdef DEBUG #ifdef DEBUG
void SLPDDatabaseDeinit(void); void SLPDDatabaseDeinit(void);
--- ./slpd/slpd_initda.c.orig 2014-02-19 18:05:31.759934637 +0000 --- ./slpd/slpd_initda.c.orig 2016-09-13 10:56:14.218459541 +0000
+++ ./slpd/slpd_initda.c 2014-02-19 18:05:31.759934637 +0000 +++ ./slpd/slpd_initda.c 2016-09-13 10:56:14.218459541 +0000
@@ -0,0 +1,396 @@ @@ -0,0 +1,396 @@
+#include <stdio.h> +#include <stdio.h>
+#include <string.h> +#include <string.h>
@ -656,8 +656,8 @@
+ return gresult; + return gresult;
+} +}
+ +
--- ./slpd/slpd_initda.h.orig 2014-02-19 18:05:31.759934637 +0000 --- ./slpd/slpd_initda.h.orig 2016-09-13 10:56:14.218459541 +0000
+++ ./slpd/slpd_initda.h 2014-02-19 18:05:31.759934637 +0000 +++ ./slpd/slpd_initda.h 2016-09-13 10:56:14.218459541 +0000
@@ -0,0 +1,16 @@ @@ -0,0 +1,16 @@
+#ifndef SLPD_INITDA_H_INCLUDED +#ifndef SLPD_INITDA_H_INCLUDED
+#define SLPD_INITDA_H_INCLUDED +#define SLPD_INITDA_H_INCLUDED
@ -675,8 +675,8 @@
+#endif /* SLPD_INITDA_H_INCLUDED */ +#endif /* SLPD_INITDA_H_INCLUDED */
+ +
+/*=========================================================================*/ +/*=========================================================================*/
--- ./slpd/slpd_log.c.orig 2014-02-19 18:05:26.156934647 +0000 --- ./slpd/slpd_log.c.orig 2016-09-13 10:56:06.326486000 +0000
+++ ./slpd/slpd_log.c 2014-02-19 18:05:31.760934637 +0000 +++ ./slpd/slpd_log.c 2016-09-13 10:56:14.219459537 +0000
@@ -509,6 +509,12 @@ void SLPDLogRegistration(const char * pr @@ -509,6 +509,12 @@ void SLPDLogRegistration(const char * pr
case SLP_REG_SOURCE_STATIC: case SLP_REG_SOURCE_STATIC:
SLPDLog("static (slp.reg)\n"); SLPDLog("static (slp.reg)\n");
@ -690,8 +690,8 @@
} }
SLPDLogBuffer(" service-url = ", SLPDLogBuffer(" service-url = ",
entry->msg->body.srvreg.urlentry.urllen, entry->msg->body.srvreg.urlentry.urllen,
--- ./slpd/slpd_main.c.orig 2014-02-19 18:05:26.156934647 +0000 --- ./slpd/slpd_main.c.orig 2016-09-13 10:56:06.326486000 +0000
+++ ./slpd/slpd_main.c 2014-02-19 18:05:31.760934637 +0000 +++ ./slpd/slpd_main.c 2016-09-13 10:57:32.988195569 +0000
@@ -57,6 +57,7 @@ @@ -57,6 +57,7 @@
#include "slp_xmalloc.h" #include "slp_xmalloc.h"
#include "slp_xid.h" #include "slp_xid.h"
@ -771,10 +771,15 @@
/* init watcher */ /* init watcher */
SLPDDatabaseWatcher(); SLPDDatabaseWatcher();
@@ -677,6 +712,38 @@ int main(int argc, char * argv[]) @@ -677,6 +712,43 @@ int main(int argc, char * argv[])
if (SetUpSignalHandlers()) if (SetUpSignalHandlers())
SLPDFatal("Error setting up signal handlers.\n"); SLPDFatal("Error setting up signal handlers.\n");
+ if (G_SlpdProperty.isDA && G_SlpdProperty.isDABackup && DABackupfp)
+ {
+ SLPDDatabaseReadDABackup(DABackupfp);
+ }
+
+ if((G_SlpdProperty.isDA) && (G_SlpdProperty.DASyncReg)) + if((G_SlpdProperty.isDA) && (G_SlpdProperty.DASyncReg))
+ { + {
+ /* HACK: at that point in time all outgoing sockets are DA connections + /* HACK: at that point in time all outgoing sockets are DA connections
@ -810,7 +815,7 @@
/* Set up alarm to age database -- a shorter start, so SAs register with us quickly on our startup */ /* Set up alarm to age database -- a shorter start, so SAs register with us quickly on our startup */
alarm(2); alarm(2);
@@ -748,6 +815,22 @@ HANDLE_SIGNAL: @@ -748,6 +820,22 @@ HANDLE_SIGNAL:
} }
#endif #endif
@ -833,9 +838,9 @@
} /* End of main loop */ } /* End of main loop */
/* Got SIGTERM */ /* Got SIGTERM */
--- ./slpd/slpd_property.c.orig 2014-02-19 18:05:26.160934647 +0000 --- ./slpd/slpd_property.c.orig 2016-09-13 10:56:06.330485986 +0000
+++ ./slpd/slpd_property.c 2014-02-19 18:05:31.760934637 +0000 +++ ./slpd/slpd_property.c 2016-09-13 10:56:14.220459534 +0000
@@ -247,6 +247,11 @@ void SLPDPropertyReinit(void) @@ -248,6 +248,11 @@ void SLPDPropertyReinit(void)
/* set up hostname */ /* set up hostname */
G_SlpdProperty.myHostname = SLPDGetCanonHostname(); G_SlpdProperty.myHostname = SLPDGetCanonHostname();
G_SlpdProperty.myHostnameLen = strlen(G_SlpdProperty.myHostname); G_SlpdProperty.myHostnameLen = strlen(G_SlpdProperty.myHostname);
@ -847,8 +852,8 @@
} }
/** Initialize the slpd property management subsystem. /** Initialize the slpd property management subsystem.
--- ./slpd/slpd_property.h.orig 2014-02-19 18:05:26.160934647 +0000 --- ./slpd/slpd_property.h.orig 2016-09-13 10:56:06.330485986 +0000
+++ ./slpd/slpd_property.h 2014-02-19 18:05:31.760934637 +0000 +++ ./slpd/slpd_property.h 2016-09-13 10:56:14.220459534 +0000
@@ -117,6 +117,11 @@ typedef struct _SLPDProperty @@ -117,6 +117,11 @@ typedef struct _SLPDProperty
int MTU; int MTU;
int useDHCP; int useDHCP;
@ -861,8 +866,8 @@
} SLPDProperty; } SLPDProperty;
extern SLPDProperty G_SlpdProperty; extern SLPDProperty G_SlpdProperty;
--- ./slpd/slpd_regfile.c.orig 2014-02-19 18:05:26.156934647 +0000 --- ./slpd/slpd_regfile.c.orig 2016-09-13 10:56:06.327485996 +0000
+++ ./slpd/slpd_regfile.c 2014-02-19 18:05:31.760934637 +0000 +++ ./slpd/slpd_regfile.c 2016-09-13 10:56:14.221459531 +0000
@@ -108,15 +108,190 @@ static char * RegFileReadLine(FILE * fd, @@ -108,15 +108,190 @@ static char * RegFileReadLine(FILE * fd,
return line; return line;
} }
@ -1332,7 +1337,7 @@
} }
--- ./slpd/slpd_regfile.h.orig 2012-11-28 17:07:04.000000000 +0000 --- ./slpd/slpd_regfile.h.orig 2012-11-28 17:07:04.000000000 +0000
+++ ./slpd/slpd_regfile.h 2014-02-19 18:05:31.760934637 +0000 +++ ./slpd/slpd_regfile.h 2016-09-13 10:56:14.221459531 +0000
@@ -53,7 +53,12 @@ @@ -53,7 +53,12 @@
#include "slp_message.h" #include "slp_message.h"
#include "slpd.h" #include "slpd.h"