@@ -2362,9 +2362,9 @@ int wolfSSH_SFTP_RecvOpen(WOLFSSH* ssh, int reqId, byte* data, word32 maxSz)
23622362
23632363 if (ret == WS_SUCCESS ) {
23642364 /* Generate unique file handle ID and add to tracking list */
2365- id [0 ] = ssh -> fileIdCount [0 ];
2366- id [1 ] = ssh -> fileIdCount [1 ];
2367- AddAssign64 (ssh -> fileIdCount , 1 );
2365+ id [0 ] = ssh -> handleIdCount [0 ];
2366+ id [1 ] = ssh -> handleIdCount [1 ];
2367+ AddAssign64 (ssh -> handleIdCount , 1 );
23682368
23692369 if ((ret = SFTP_AddFileHandle (ssh , fd , dir , id )) != WS_SUCCESS ) {
23702370 WLOG (WS_LOG_SFTP , "Unable to store handle" );
@@ -2546,9 +2546,9 @@ int wolfSSH_SFTP_RecvOpen(WOLFSSH* ssh, int reqId, byte* data, word32 maxSz)
25462546
25472547 if (ret == WS_SUCCESS ) {
25482548 /* Generate unique file handle ID and add to tracking list */
2549- id [0 ] = ssh -> fileIdCount [0 ];
2550- id [1 ] = ssh -> fileIdCount [1 ];
2551- AddAssign64 (ssh -> fileIdCount , 1 );
2549+ id [0 ] = ssh -> handleIdCount [0 ];
2550+ id [1 ] = ssh -> handleIdCount [1 ];
2551+ AddAssign64 (ssh -> handleIdCount , 1 );
25522552
25532553 if (SFTP_AddFileHandle (ssh , fileHandle , dir , id ) != WS_SUCCESS ) {
25542554 WLOG (WS_LOG_SFTP , "Unable to store handle" );
@@ -2718,11 +2718,11 @@ int wolfSSH_SFTP_RecvOpenDir(WOLFSSH* ssh, int reqId, byte* data, word32 maxSz)
27182718#else
27192719 cur -> dir = ctx ;
27202720#endif
2721- cur -> id [0 ] = id [0 ] = ssh -> dirIdCount [0 ];
2722- cur -> id [1 ] = id [1 ] = ssh -> dirIdCount [1 ];
2721+ cur -> id [0 ] = id [0 ] = ssh -> handleIdCount [0 ];
2722+ cur -> id [1 ] = id [1 ] = ssh -> handleIdCount [1 ];
27232723 c32toa (id [0 ], idFlat );
27242724 c32toa (id [1 ], idFlat + UINT32_SZ );
2725- AddAssign64 (ssh -> dirIdCount , 1 );
2725+ AddAssign64 (ssh -> handleIdCount , 1 );
27262726 cur -> isEof = 0 ;
27272727 cur -> next = ssh -> dirList ;
27282728 ssh -> dirList = cur ;
@@ -2877,11 +2877,11 @@ int wolfSSH_SFTP_RecvOpenDir(WOLFSSH* ssh, int reqId, byte* data, word32 maxSz)
28772877 return WS_MEMORY_E ;
28782878 }
28792879 cur -> dir = INVALID_HANDLE_VALUE ;
2880- cur -> id [0 ] = id [0 ] = ssh -> dirIdCount [0 ];
2881- cur -> id [1 ] = id [1 ] = ssh -> dirIdCount [1 ];
2880+ cur -> id [0 ] = id [0 ] = ssh -> handleIdCount [0 ];
2881+ cur -> id [1 ] = id [1 ] = ssh -> handleIdCount [1 ];
28822882 c32toa (id [0 ], idFlat );
28832883 c32toa (id [1 ], idFlat + UINT32_SZ );
2884- AddAssign64 (ssh -> dirIdCount , 1 );
2884+ AddAssign64 (ssh -> handleIdCount , 1 );
28852885 cur -> isEof = 0 ;
28862886 cur -> dirName = dirName ; /* take over ownership of buffer */
28872887 cur -> next = ssh -> dirList ;
0 commit comments