1 #include <proto/exec.h>
2 #include <proto/rexxsyslib.h>
3 #include <rexx/storage.h>
4 #include <rexx/errors.h>
10 #include "rexxsupport_intern.h"
12 void portcleanup(struct Library
*RexxSupportBase
, struct PortNode
*node
)
15 struct PortNodeData
*data
= &node
->data
;
18 if (IsListEmpty(&RSBI(RexxSupportBase
)->openports
))
19 RexxSupportBase
->lib_OpenCnt
--;
23 ForeachNode(&data
->msgs
, msg
)
27 msg
->rm_Result1
= RC_ERROR
;
28 msg
->rm_Result2
= (IPTR
)ERR10_013
;
30 ReplyMsg((struct Message
*)msg
);
33 while ((msg
= (struct RexxMsg
*)GetMsg(node
->data
.port
)) != NULL
)
37 msg
->rm_Result1
= RC_ERROR
;
38 msg
->rm_Result2
= (IPTR
)ERR10_013
;
40 ReplyMsg((struct Message
*)msg
);
43 DeleteMsgPort(data
->port
);
45 FreeMem(data
->node
.ln_Name
, strlen(data
->node
.ln_Name
)+1);
46 FreeMem(node
, sizeof(struct PortNode
));