[prev in list] [next in list] [prev in thread] [next in thread]
List: linware
Subject: Re: write_wdata problems in mars?
From: Martin Stover <mstover () stover ! f ! eunet ! de>
Date: 1997-03-18 2:53:33
[Download RAW message or body]
> NWSERV 0:write_wdata:No such file or directory
> to NWBIND
Here is a little patch which should help.
Here is a second patch against a bad bug
with namespace routines (creat file), which should be applied. !
Martin
<------- snip --------------->
diff -rub org/mars_nwe/net1.c mars_nwe/net1.c
--- org/mars_nwe/net1.c Thu Jan 2 16:14:20 1997
+++ mars_nwe/net1.c Tue Mar 11 18:24:57 1997
@@ -1,4 +1,4 @@
-/* net1.c, 26-Oct-96 */
+/* net1.c, 11-Mar-97 */
/* (C)opyright (C) 1993,1995 Martin Stover, Marburg, Germany
*
@@ -266,7 +266,6 @@
/* returns < 0 if senderror or functionresultcode > = 0 */
{
static int lastsequence=0;
- int result = -1;
int tries = 0;
int sendsize = d->owndata.d.size+sizeof(d->owndata.d.size)+
sizeof(d->owndata.h);
@@ -275,32 +274,28 @@
d->owndata.h.sequence = (uint8) ++lastsequence;
d->owndata.h.reserved = 0;
- while (tries++ < MAX_SEND_TRIES && result < 0) {
- result=send_ipx_data(fd, 17, sendsize, (char*)d,
- toaddr, "send_own_data");
- if (result > -1) {
+ while (tries++ < MAX_SEND_TRIES) {
+ int result=send_ipx_data(fd, 17, sendsize, (char*)d,
+ toaddr, "send_own_data");
+ while (result > -1) {
int packet_typ;
IPX_DATA ipxd;
ipxAddr_t fromaddr;
- result=receive_ipx_data(fd, &packet_typ, &ipxd, &fromaddr,
- MAX_WAIT_MSEC);
+ result=receive_ipx_data(fd, &packet_typ, &ipxd, &fromaddr,MAX_WAIT_MSEC);
XDPRINTF((2, 0, "receive_ipx_data, result=%d, typ=0x%x%x, sequence=%d",
result,
(int)ipxd.ownreply.type[0],
(int)ipxd.ownreply.type[1],
(int)ipxd.ownreply.sequence ));
- if (sizeof(OWN_REPLY) == result &&
- ipxd.ownreply.type[0] == 0xef &&
- ipxd.ownreply.type[1] == 0xef &&
- /* !memcmp(&fromaddr, toaddr, sizeof(ipxAddr_t)) && */
- ipxd.ownreply.sequence == d->owndata.h.sequence) {
- result = (int)ipxd.ownreply.result;
- } else
- result=-1;
- }
+ if (sizeof(OWN_REPLY) == result
+ && ipxd.ownreply.type[0] == 0xef
+ && ipxd.ownreply.type[1] == 0xef
+ && ipxd.ownreply.sequence == d->owndata.h.sequence)
+ return((int)ipxd.ownreply.result);
} /* while */
- return(result);
+ } /* while */
+ return(-1);
}
int send_own_reply(int fd, int result, int sequence, ipxAddr_t *toaddr)
diff -rub org/mars_nwe/namspace.c mars_nwe/namspace.c
--- org/mars_nwe/namspace.c Thu Jan 2 16:25:25 1997
+++ mars_nwe/namspace.c Mon Mar 17 01:02:49 1997
@@ -532,8 +532,9 @@
&& nwpath->volume == e->nwpath.volume
&& nwpath->statb.st_ino == e->nwpath.statb.st_ino
&& nwpath->statb.st_dev == e->nwpath.statb.st_dev) {
- if (nwp_stat(&(e->nwpath), "insert_get_base_entry")) {
- /* the path has changed, we say handle is wrong */
+ if (nwp_stat(&(e->nwpath), "insert_get_base_entry")
+ || strcmp(e->nwpath.path, nwpath->path)) {
+ /* the path has changed, we remove this entry */
free_dbe_p(e);
} else {
return(touch_handle_entry_p(e));
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic