Added a missing mutex

This commit is contained in:
Davis King 2012-11-07 18:12:40 -05:00
parent 444dd70d34
commit 62d28ae465
1 changed files with 7 additions and 1 deletions

View File

@ -511,12 +511,17 @@ namespace dlib
} }
unsigned long get_max_content_length ( unsigned long get_max_content_length (
) const { return max_content_length; } ) const
{
auto_mutex lock(http_class_mutex);
return max_content_length;
}
void set_max_content_length ( void set_max_content_length (
unsigned long max_length unsigned long max_length
) )
{ {
auto_mutex lock(http_class_mutex);
max_content_length = max_length; max_content_length = max_length;
} }
@ -560,6 +565,7 @@ namespace dlib
} }
} }
mutex http_class_mutex;
unsigned long max_content_length; unsigned long max_content_length;
const static logger dlog; const static logger dlog;
}; };