diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-06-24 16:26:23 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-06-24 16:26:23 +1000 |
commit | 6da26870e0ae5acd6ff49a30ec2f6886b44d095e (patch) | |
tree | 850c71039563c16a5d563c47e7ba2ab645baf198 /source3/lib/serverid.c | |
parent | 6925a799d04c6fa59dd2ddef1f5510f9bb7d17d1 (diff) | |
parent | 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 (diff) | |
download | samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.gz samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.bz2 samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.zip |
Merge 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 as Samba-4.0alpha16
Diffstat (limited to 'source3/lib/serverid.c')
-rw-r--r-- | source3/lib/serverid.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/lib/serverid.c b/source3/lib/serverid.c index f13c66e2c9..1a1141265a 100644 --- a/source3/lib/serverid.c +++ b/source3/lib/serverid.c @@ -20,10 +20,13 @@ #include "includes.h" #include "system/filesys.h" #include "serverid.h" +#include "util_tdb.h" #include "dbwrap.h" +#include "lib/util/tdb_wrap.h" struct serverid_key { pid_t pid; + uint32_t task_id; uint32_t vnn; }; @@ -70,6 +73,7 @@ static void serverid_fill_key(const struct server_id *id, { ZERO_STRUCTP(key); key->pid = id->pid; + key->task_id = id->task_id; key->vnn = id->vnn; } @@ -246,7 +250,7 @@ bool serverid_exists(const struct server_id *id) state.id = id; state.exists = false; - if (db->parse_record(db, tdbkey, server_exists_parse, &state) == -1) { + if (db->parse_record(db, tdbkey, server_exists_parse, &state) != 0) { return false; } return state.exists; @@ -273,6 +277,7 @@ static bool serverid_rec_parse(const struct db_record *rec, memcpy(&data, rec->value.dptr, sizeof(data)); id->pid = key.pid; + id->task_id = key.task_id; id->vnn = key.vnn; id->unique_id = data.unique_id; *msg_flags = data.msg_flags; |