Will allow [find/search]_next() calls to find and close any associated
fsp. This function is temporary and will eventually go away once I
modify dptr_fetch() to return an fsp.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
return(0);
}
+/****************************************************************************
+ Get the fsp stored in a dptr->dir_hnd.
+****************************************************************************/
+
+files_struct *dptr_fsp(struct smbd_server_connection *sconn, int key)
+{
+ struct dptr_struct *dptr = dptr_get(sconn, key);
+ if (dptr == NULL) {
+ return NULL;
+ }
+ if (dptr->dir_hnd == NULL) {
+ return NULL;
+ }
+ return dptr->dir_hnd->fsp;
+}
+
/****************************************************************************
Close a dptr (internal func).
****************************************************************************/
const char *dptr_path(struct smbd_server_connection *sconn, int key);
const char *dptr_wcard(struct smbd_server_connection *sconn, int key);
uint16_t dptr_attr(struct smbd_server_connection *sconn, int key);
+files_struct *dptr_fsp(struct smbd_server_connection *sconn, int key);
void dptr_close(struct smbd_server_connection *sconn, int *key);
void dptr_closecnum(connection_struct *conn);
bool dptr_activecnum(const struct smbd_server_connection *sconn,