nwconn first try for file open
All checks were successful
Source release / source-package (push) Successful in 41s
All checks were successful
Source release / source-package (push) Successful in 41s
This commit is contained in:
@@ -2590,13 +2590,38 @@ int nw_creat_open_file(int dir_handle, uint8 *data, int len,
|
||||
{
|
||||
NW_PATH nwpath;
|
||||
struct stat stbuff;
|
||||
char reqname[300];
|
||||
|
||||
if (len < 0) len = 0;
|
||||
if (len >= (int)sizeof(reqname)) len = sizeof(reqname) - 1;
|
||||
memcpy(reqname, data, len);
|
||||
reqname[len] = '\0';
|
||||
|
||||
XDPRINTF((2,0,
|
||||
"CONNECT nw_creat_open_file ENTER dir_handle=%d attrib=0x%x access=0x%x creatmode=0x%x task=%d req='%s'",
|
||||
dir_handle, attrib, access, creatmode, task, reqname));
|
||||
|
||||
int completition = conn_get_kpl_path(&nwpath, &stbuff, dir_handle, data, len, 0);
|
||||
|
||||
XDPRINTF((2,0,
|
||||
"CONNECT nw_creat_open_file KPL result=0x%x req='%s'",
|
||||
completition, reqname));
|
||||
|
||||
if (completition > -1) {
|
||||
char unixname[300];
|
||||
xstrcpy(unixname, build_unix_name(&nwpath, 0));
|
||||
|
||||
XDPRINTF((2,0,
|
||||
"CONNECT nw_creat_open_file UNIX path='%s' nwpath.path='%s' nwpath.fn='%s' volume=%d",
|
||||
unixname, nwpath.path, nwpath.fn, nwpath.volume));
|
||||
|
||||
completition=file_creat_open(nwpath.volume, (uint8*)unixname,
|
||||
&stbuff, attrib, access, creatmode, task);
|
||||
|
||||
XDPRINTF((2,0,
|
||||
"CONNECT nw_creat_open_file OPEN result=0x%x unix='%s'",
|
||||
completition, unixname));
|
||||
|
||||
if (completition > -1)
|
||||
get_file_attrib(info, unixname, &stbuff, &nwpath);
|
||||
}
|
||||
|
||||
28
src/nwconn.c
28
src/nwconn.c
@@ -1511,7 +1511,7 @@ static int handle_ncp_serv(void)
|
||||
uint8 *getsize=responsedata;
|
||||
int buffer_size = (int) (GET_BE16((uint8*)requestdata));
|
||||
/* Der Novell-Client der PAM's Net/E-Ethernetkarte
|
||||
für Atari ST/TT meldet ein Packetsize von 0 wenn
|
||||
f<EFBFBD>r Atari ST/TT meldet ein Packetsize von 0 wenn
|
||||
nwserv NACH dem Novell Client NET_S1.PRG
|
||||
gestartet wird. Da 0 in jedem Falle ein unsinniger
|
||||
Wert ist, wird rw_buffer_size nicht verwendet.
|
||||
@@ -1679,6 +1679,13 @@ static int handle_ncp_serv(void)
|
||||
uint8 reserved[2]; /* reserved by novell */
|
||||
NW_FILE_INFO fileinfo;
|
||||
} *xdata= (struct XDATA*)responsedata;
|
||||
input->data[input->len] = '\0';
|
||||
XDPRINTF((2,0,
|
||||
"NWC OPEN41 dirhandle=%d len=%d name='%s' task=%d",
|
||||
(int)input->dirhandle,
|
||||
(int)input->len,
|
||||
input->data,
|
||||
(int)(ncprequest->task)));
|
||||
int fhandle=nw_creat_open_file((int)input->dirhandle,
|
||||
input->data, input->len,
|
||||
&(xdata->fileinfo),
|
||||
@@ -1686,6 +1693,11 @@ static int handle_ncp_serv(void)
|
||||
0x1, /* read access */
|
||||
0,
|
||||
(int)(ncprequest->task));
|
||||
XDPRINTF((2,0,
|
||||
"NWC OPEN41 RESULT fhandle=%d compl_if_err=0x%x name='%s'",
|
||||
fhandle,
|
||||
(fhandle < 0) ? -fhandle : 0,
|
||||
input->data));
|
||||
|
||||
if (fhandle > -1){
|
||||
U32_TO_32(fhandle, xdata->fhandle);
|
||||
@@ -1973,12 +1985,26 @@ static int handle_ncp_serv(void)
|
||||
uint8 reserved[2]; /* reserved by Novell */
|
||||
NW_FILE_INFO fileinfo;
|
||||
} *xdata= (struct XDATA*)responsedata;
|
||||
input->data[input->len] = '\0';
|
||||
XDPRINTF((2,0,
|
||||
"NWC OPEN4C dirhandle=%d attrib=0x%x access=0x%x len=%d name='%s' task=%d",
|
||||
(int)input->dirhandle,
|
||||
(int)input->attrib,
|
||||
(int)input->access,
|
||||
(int)input->len,
|
||||
input->data,
|
||||
(int)(ncprequest->task)));
|
||||
int fhandle=nw_creat_open_file((int)input->dirhandle,
|
||||
input->data, input->len,
|
||||
&(xdata->fileinfo),
|
||||
(int)input->attrib,
|
||||
(int)input->access, 0,
|
||||
(int)(ncprequest->task));
|
||||
XDPRINTF((2,0,
|
||||
"NWC OPEN4C RESULT fhandle=%d compl_if_err=0x%x name='%s'",
|
||||
fhandle,
|
||||
(fhandle < 0) ? -fhandle : 0,
|
||||
input->data));
|
||||
|
||||
if (fhandle > -1){
|
||||
U32_TO_32 (fhandle, xdata->fhandle);
|
||||
|
||||
Reference in New Issue
Block a user