2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
9 #include "dos_intern.h"
10 #include <exec/lists.h>
11 #include <proto/exec.h>
13 /*****************************************************************************
17 #include <dos/notify.h>
18 #include <proto/dos.h>
22 AROS_LH1(void, EndNotify
,
25 AROS_LHA(struct NotifyRequest
*, notify
, D1
),
28 struct DosLibrary
*, DOSBase
, 149, Dos
)
32 End a notification (quit notifying for a request previously sent with
37 notify -- NotifyRequest used with StartNotify()
53 *****************************************************************************/
56 AROS_LIBBASE_EXT_DECL(struct DosLibrary
*,DOSBase
)
58 struct IOFileSys iofs
;
60 /* Prepare I/O request. */
61 InitIOFS(&iofs
, FSA_REMOVE_NOTIFY
, DOSBase
);
63 iofs
.io_Union
.io_NOTIFY
.io_NotificationRequest
= notify
;
65 if (strchr(notify
->nr_Name
, ':'))
67 DoName(&iofs
, notify
->nr_Name
, DOSBase
);
71 iofs
.IOFS
.io_Device
= (struct Device
*)notify
->nr_Device
;
73 if (iofs
.IOFS
.io_Device
== NULL
)
81 if (notify
->nr_Flags
& NRF_SEND_MESSAGE
)
83 struct Node
*tempNode
;
84 struct NotifyMessage
*nm
;
88 ForeachNodeSafe(¬ify
->nr_stuff
.nr_Msg
.nr_Port
->mp_MsgList
,
91 if (notify
->nr_MsgCount
== 0)
96 if (nm
->nm_NReq
== notify
)
98 notify
->nr_MsgCount
--;
99 Remove((struct Node
*)nm
);
100 ReplyMsg((struct Message
*)nm
);
107 SetIoErr(iofs
.io_DosError
);