added MOO_EBADHND

This commit is contained in:
hyunghwan.chung
2017-10-30 01:11:18 +00:00
parent 2c85319cb0
commit d042f0f494
11 changed files with 185 additions and 52 deletions

View File

@ -424,6 +424,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@

View File

@ -98,15 +98,18 @@ static moo_pfrc_t pf_close_socket (moo_t* moo, moo_ooi_t nargs)
if (close(MOO_OOP_TO_SMOOI(sck->handle)) == -1)
{
MOO_STACK_SETRETTOERROR (moo, nargs, moo_syserr_to_errnum(errno));
return MOO_PF_SUCCESS;
}
else
{
sck->handle = MOO_SMOOI_TO_OOP(-1);
MOO_STACK_SETRETTORCV (moo, nargs);
}
}
else
{
MOO_STACK_SETRETTOERROR (moo, nargs, MOO_EBADHND);
}
MOO_STACK_SETRETTORCV (moo, nargs);
return MOO_PF_SUCCESS;
}