marignotti/mdetach.c

24 lines
441 B
C
Raw Normal View History

2012-05-05 05:08:27 +00:00
#include "marignotti.h"
#include <gno/kerntool.h>
#include <errno.h>
2012-05-05 06:20:05 +00:00
#include <misctool.h>
2012-05-05 05:08:27 +00:00
#pragma noroot
#pragma optimize 79
//
int mdetach(Entry *e, void *p1, void *p2, void *p3, void *p4, void *p5)
{
// TODO -- SO_LINGER/SO_LINGER_SEC
2012-05-05 06:20:05 +00:00
LongWord timeout;
2012-05-05 05:08:27 +00:00
2012-05-05 06:20:05 +00:00
timeout = GetTick() + 5 * 60;
2012-05-05 05:08:27 +00:00
SEI();
e->command = kCommandDisconnectAndLogout;
e->cookie = 0;
2012-05-05 06:20:05 +00:00
e->timeout = timeout;
2012-05-05 05:08:27 +00:00
CLI();
return 0;
}