Fixing a mutex lock error in alert_parser.c

This commit is contained in:
BlackLight 2010-11-23 00:36:53 +01:00
parent 9e83149a9b
commit 71800b02fc
1 changed files with 2 additions and 2 deletions

View File

@ -242,6 +242,8 @@ AI_file_alertparser_thread ( void* arg )
fseek ( alert_fp, 0, SEEK_END );
#endif
pthread_mutex_lock ( &alert_mutex );
while ( !feof ( alert_fp ))
{
fgets ( line, sizeof(line), alert_fp );
@ -300,8 +302,6 @@ AI_file_alertparser_thread ( void* arg )
if ( !in_alert )
{
pthread_mutex_lock ( &alert_mutex );
if ( preg_match ( "^\\[\\*\\*\\]\\s*\\[([0-9]+):([0-9]+):([0-9]+)\\]\\s*(.*)\\s*\\[\\*\\*\\]$", line, &matches, &nmatches ) > 0 )
{
in_alert = true;