|
|
@ -203,10 +203,13 @@ static int __dir_open(void *m, sexp_t *sx)
|
|
|
|
DIR *dp = NULL;
|
|
|
|
DIR *dp = NULL;
|
|
|
|
if ( !(dp = opendir(dir_name)) ) {
|
|
|
|
if ( !(dp = opendir(dir_name)) ) {
|
|
|
|
pthread_rwlock_unlock(&_lock);
|
|
|
|
pthread_rwlock_unlock(&_lock);
|
|
|
|
free(item);
|
|
|
|
FREE(item);
|
|
|
|
|
|
|
|
FREE(dir_name);
|
|
|
|
return sxmsg_return(msg, SNE_FAILED);
|
|
|
|
return sxmsg_return(msg, SNE_FAILED);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FREE(dir_name);
|
|
|
|
|
|
|
|
|
|
|
|
/* init stream */
|
|
|
|
/* init stream */
|
|
|
|
item->dsid = _rd_last_id;
|
|
|
|
item->dsid = _rd_last_id;
|
|
|
|
item->dp = dp;
|
|
|
|
item->dp = dp;
|
|
|
|