"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "inotify.c" between
minidlna-1.1.4.tar.gz and minidlna-1.1.5.tar.gz

About: ReadyMedia (formerly known as MiniDLNA) is a simple media server software, with the aim of being fully compliant with DLNA/UPnP-AV clients.

inotify.c  (minidlna-1.1.4):inotify.c  (minidlna-1.1.5)
skipping to change at line 331 skipping to change at line 331
break; break;
case TYPE_AUDIO: case TYPE_AUDIO:
if( !is_audio(path) && if( !is_audio(path) &&
!is_playlist(path) ) !is_playlist(path) )
return -1; return -1;
break; break;
case TYPE_AUDIO|TYPE_VIDEO: case TYPE_AUDIO|TYPE_VIDEO:
if( !is_audio(path) && if( !is_audio(path) &&
!is_video(path) && !is_video(path) &&
!is_playlist(path) ) !is_playlist(path) )
return -1;
break; break;
case TYPE_AUDIO|TYPE_IMAGES: case TYPE_AUDIO|TYPE_IMAGES:
if( !is_image(path) && if( !is_image(path) &&
!is_audio(path) && !is_audio(path) &&
!is_playlist(path) ) !is_playlist(path) )
return -1; return -1;
break; break;
case TYPE_VIDEO: case TYPE_VIDEO:
if( !is_video(path) ) if( !is_video(path) )
return -1; return -1;
skipping to change at line 718 skipping to change at line 719
snprintf(path_buf, sizeof(path_buf), "%s/%s", get _path_from_wd(event->wd), event->name); snprintf(path_buf, sizeof(path_buf), "%s/%s", get _path_from_wd(event->wd), event->name);
if ( event->mask & IN_ISDIR && (event->mask & (IN _CREATE|IN_MOVED_TO)) ) if ( event->mask & IN_ISDIR && (event->mask & (IN _CREATE|IN_MOVED_TO)) )
{ {
DPRINTF(E_DEBUG, L_INOTIFY, "The directo ry %s was %s.\n", DPRINTF(E_DEBUG, L_INOTIFY, "The directo ry %s was %s.\n",
path_buf, (event->mask & IN_MOVED _TO ? "moved here" : "created")); path_buf, (event->mask & IN_MOVED _TO ? "moved here" : "created"));
inotify_insert_directory(pollfds[0].fd, e sc_name, path_buf); inotify_insert_directory(pollfds[0].fd, e sc_name, path_buf);
} }
else if ( (event->mask & (IN_CLOSE_WRITE|IN_MOVED _TO|IN_CREATE)) && else if ( (event->mask & (IN_CLOSE_WRITE|IN_MOVED _TO|IN_CREATE)) &&
(lstat(path_buf, &st) == 0) ) (lstat(path_buf, &st) == 0) )
{ {
if( S_ISLNK(st.st_mode) ) if( (event->mask & (IN_MOVED_TO|IN_CREATE )) && (S_ISLNK(st.st_mode) || st.st_nlink > 1) )
{ {
DPRINTF(E_DEBUG, L_INOTIFY, "The DPRINTF(E_DEBUG, L_INOTIFY, "The
symbolic link %s was %s.\n", %s link %s was %s.\n",
(S_ISLNK(st.st_mode) ? "s
ymbolic" : "hard"),
path_buf, (event->mask & IN_MOVED_TO ? "moved here" : "created")); path_buf, (event->mask & IN_MOVED_TO ? "moved here" : "created"));
if( stat(path_buf, &st) == 0 && S _ISDIR(st.st_mode) ) if( stat(path_buf, &st) == 0 && S _ISDIR(st.st_mode) )
inotify_insert_directory( pollfds[0].fd, esc_name, path_buf); inotify_insert_directory( pollfds[0].fd, esc_name, path_buf);
else else
inotify_insert_file(esc_n ame, path_buf); inotify_insert_file(esc_n ame, path_buf);
} }
else if( event->mask & (IN_CLOSE_WRITE|IN _MOVED_TO) && st.st_size > 0 ) else if( event->mask & (IN_CLOSE_WRITE|IN _MOVED_TO) && st.st_size > 0 )
{ {
if( (event->mask & IN_MOVED_TO) | | if( (event->mask & IN_MOVED_TO) | |
(sql_get_int_field(db, "SELEC T TIMESTAMP from DETAILS where PATH = '%q'", path_buf) != st.st_mtime) ) (sql_get_int_field(db, "SELEC T TIMESTAMP from DETAILS where PATH = '%q'", path_buf) != st.st_mtime) )
 End of changes. 3 change blocks. 
3 lines changed or deleted 6 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS