mirror of
https://github.com/RGBCube/serenity
synced 2025-07-07 20:17:34 +00:00
Kernel: Allow Socket subclasses to fail construction
For example, socket(AF_INET) should only succeed for valid SOCK_TYPEs.
This commit is contained in:
parent
a93f35ac71
commit
03d73cbaae
5 changed files with 7 additions and 6 deletions
|
@ -37,7 +37,6 @@
|
|||
|
||||
KResultOr<NonnullRefPtr<Socket>> Socket::create(int domain, int type, int protocol)
|
||||
{
|
||||
(void)protocol;
|
||||
switch (domain) {
|
||||
case AF_LOCAL:
|
||||
return LocalSocket::create(type & SOCK_TYPE_MASK);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue