Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ingo Voss
OpenLDAP
Commits
c315ede9
Commit
c315ede9
authored
Nov 21, 2009
by
Pierangelo Masarati
Browse files
connid is unsigned; offset real conns by maxrid + 1
parent
2fd6d474
Changes
2
Hide whitespace changes
Inline
Side-by-side
servers/slapd/connection.c
View file @
c315ede9
...
...
@@ -48,7 +48,7 @@ static ldap_pvt_thread_mutex_t connections_mutex;
static
Connection
*
connections
=
NULL
;
static
ldap_pvt_thread_mutex_t
conn_nextid_mutex
;
static
unsigned
long
conn_nextid
=
0
;
static
unsigned
long
conn_nextid
=
SLAPD_SYNC_SYNCCONN_OFFSET
;
static
const
char
conn_lost_str
[]
=
"connection lost"
;
...
...
servers/slapd/slap.h
View file @
c315ede9
...
...
@@ -1701,13 +1701,15 @@ typedef BackendDB Backend;
struct
syncinfo_s
;
/* fake conn connid constructed as SLAPD_SYNC_CONN_OFFSET - rid */
#define SLAPD_SYNC_SYNCCONN_OFFSET (-1000)
#define SLAPD_SYNC_IS_SYNCCONN(connid) ((connid) <= SLAPD_SYNC_SYNCCONN_OFFSET)
#define SLAPD_SYNC_RID2SYNCCONN(rid) (SLAPD_SYNC_SYNCCONN_OFFSET - (rid))
#define SLAP_SYNC_RID_MAX 999
#define SLAP_SYNC_SID_MAX 4095
/* based on liblutil/csn.c field width */
/* fake conn connid constructed as rid; real connids start
* at SLAPD_SYNC_CONN_OFFSET */
#define SLAPD_SYNC_SYNCCONN_OFFSET (SLAP_SYNC_RID_MAX + 1)
#define SLAPD_SYNC_IS_SYNCCONN(connid) ((connid) < SLAPD_SYNC_SYNCCONN_OFFSET)
#define SLAPD_SYNC_RID2SYNCCONN(rid) (rid)
#define SLAP_SYNCUUID_SET_SIZE 256
struct
sync_cookie
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment