UltraMonkey-L7 V3(multi-thread implementation)
修订版 | 78cb6e9eecafecc60437394b5f36161822091fa2 (tree) |
---|---|
时间 | 2013-06-24 16:00:27 |
作者 | Hiroaki Nakano <nakano.hiroaki@nttc...> |
Commiter | Hiroaki Nakano |
RHEL6.1上コンパイルエラー対処
#30993 の対処をいれると、RHEL6.1上では返り値が使われていない
というエラーが出るため、対処。
Signed-off-by: Hiroaki Nakano <nakano.hiroaki@nttcom.co.jp>
@@ -2993,13 +2993,14 @@ bool l7vs::l7vsadm::execute(int argc, char *argv[]) | ||
2993 | 2993 | set_parameter(); |
2994 | 2994 | |
2995 | 2995 | // Get l7vsadm execute file path from /proc/(pid)/exe (symbolic link) |
2996 | + ssize_t ret; | |
2996 | 2997 | char l7vsadm_file_path[256]; |
2997 | 2998 | memset(l7vsadm_file_path, 0, sizeof(l7vsadm_file_path)); |
2998 | - readlink("/proc/self/exe", l7vsadm_file_path, sizeof(l7vsadm_file_path)); | |
2999 | + ret = readlink("/proc/self/exe", l7vsadm_file_path, sizeof(l7vsadm_file_path)); | |
2999 | 3000 | |
3000 | 3001 | // L7vsadm command conflict check. (Try l7vsadm execute file lock) |
3001 | 3002 | file_lock lock(l7vsadm_file_path, l7vsadm_err); |
3002 | - if (l7vsadm_err) { | |
3003 | + if (l7vsadm_err || ret == -1) { | |
3003 | 3004 | std::cerr << "COMMON ERROR: " << l7vsadm_err.get_message() << std::endl; |
3004 | 3005 | Logger::putLogError(LOG_CAT_L7VSADM_COMMON, 2, l7vsadm_err.get_message(), __FILE__, __LINE__); |
3005 | 3006 | return false; |