Added checks to return status of some functions.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2690 e3e1d417-86f3-4887-817a-d78f3d33393fpull/27/merge
parent
4489aeca09
commit
842398a32f
|
@ -486,8 +486,10 @@ Monitor::Monitor(
|
|||
}
|
||||
char temp_path[PATH_MAX];
|
||||
snprintf( temp_path, sizeof(temp_path), "%d", id );
|
||||
chdir( config.dir_events );
|
||||
symlink( temp_path, name );
|
||||
if ( chdir( config.dir_events ) < 0 )
|
||||
Fatal( "Can't change directory to '%s': %s", config.dir_events, strerror(errno) );
|
||||
if ( symlink( temp_path, name ) < 0 )
|
||||
Fatal( "Can't symlink '%s' to '%s': %s", temp_path, name, strerror(errno) );
|
||||
chdir( ".." );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue