This will allow this structure to be shared, and allow us to create a
common messaging system between all Samba processes. Samba4 uses the
id2 to indicate the different tasks within a single unix process.
Andrew Bartlett
struct serverid_key {
pid_t pid;
+ uint32_t id2;
uint32_t vnn;
};
{
ZERO_STRUCTP(key);
key->pid = id->pid;
+ key->id2 = id->id2;
key->vnn = id->vnn;
}
memcpy(&data, rec->value.dptr, sizeof(data));
id->pid = key.pid;
+ id->id2 = key.id2;
id->vnn = key.vnn;
id->unique_id = data.unique_id;
*msg_flags = data.msg_flags;
{
struct server_id result;
result.pid = pid;
+ result.id2 = 0;
result.unique_id = my_unique_id;
result.vnn = my_vnn;
return result;
{
if (p1->pid != p2->pid)
return False;
+ if (p1->id2 != p2->id2)
+ return False;
if (p1->vnn != p2->vnn)
return False;
return True;
{
if (pid->pid != sys_getpid())
return False;
+ if (pid->id2 != 0)
+ return False;
if (pid->vnn != my_vnn)
return False;
return True;
typedef [public] struct {
uint32 pid;
+ uint32 id2;
uint32 vnn;
udlong unique_id;
} server_id;