Skip to content
This repository was archived by the owner on Nov 16, 2020. It is now read-only.

Commit ab08657

Browse files
authored
Update README.md
1 parent b572f3b commit ab08657

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

rls_v2/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,22 @@ Hide ONCRPC specific system calls (clnt_xxx(), readdir_1()) from `rls.c`.
1717
- `dir_local.c/h` : `read_dir()` local function to read the directory
1818
- **Server** : `dir_proc.c` executes a local funtion `read_dir()` defined in `dir_local.h`
1919
- **Client** : `READ_DIR():dir_common.c` executes a local function `read_dir():dir_local.c` or communicate with RPC server `readdir_1()` depending on Handler's `CLINET`.
20+
```
21+
namelist READ_DIR( HANDLER *remote, char *dir ) {
22+
if ( remote->clnt != (CLIENT *)NULL ) {
23+
...
24+
result = readdir_1(&dir, remote->clnt);
25+
if (result == (readdir_res *)NULL) {
26+
clnt_perror(remote->clnt, remote->server);
27+
return NULL;
28+
}
29+
...
30+
} else {
31+
return read_dir(dir);
32+
}
33+
return NULL;
34+
}
35+
```
2036

2137
#### 3. Client `rls.c`
2238

0 commit comments

Comments
 (0)