GUnixFDMessage: fix a small typo in an extra check

In the deserialise function, GUnixFDMessage was comparing 'level' to
both SOL_SOCKET and SCM_RIGHTS.  It is correct to compare 'type' to
SCM_RIGHTS.  The code passed tests only because:

1) it's a "should always be OK" double-check

2) SOL_SOCKET and SCM_RIGHTS, by chance, both have the value '1' on
   Linux systems.
This commit is contained in:
Ryan Lortie 2010-01-05 18:49:23 -05:00
parent b00c6d7fb5
commit baf20e0984

View File

@ -84,7 +84,7 @@ g_unix_fd_message_deserialize (int level,
gint *fds;
if (level != SOL_SOCKET ||
level != SCM_RIGHTS)
type != SCM_RIGHTS)
return NULL;
if (size % 4 > 0)