正在显示
1 个修改的文件
包含
36 行增加
和
0 行删除
| @@ -1405,6 +1405,42 @@ int SrsConfig::check_config() | @@ -1405,6 +1405,42 @@ int SrsConfig::check_config() | ||
| 1405 | return ret; | 1405 | return ret; |
| 1406 | } | 1406 | } |
| 1407 | 1407 | ||
| 1408 | + //////////////////////////////////////////////////////////////////////// | ||
| 1409 | + // check heartbeat | ||
| 1410 | + //////////////////////////////////////////////////////////////////////// | ||
| 1411 | + if (get_heartbeat_interval() <= 0) { | ||
| 1412 | + ret = ERROR_SYSTEM_CONFIG_INVALID; | ||
| 1413 | + srs_error("directive heartbeat interval invalid, interval=%"PRId64", ret=%d", | ||
| 1414 | + get_heartbeat_interval(), ret); | ||
| 1415 | + return ret; | ||
| 1416 | + } | ||
| 1417 | + if (get_heartbeat_device_index() < 0) { | ||
| 1418 | + ret = ERROR_SYSTEM_CONFIG_INVALID; | ||
| 1419 | + srs_error("directive heartbeat device_index invalid, device_index=%d, ret=%d", | ||
| 1420 | + get_heartbeat_device_index(), ret); | ||
| 1421 | + return ret; | ||
| 1422 | + } | ||
| 1423 | + | ||
| 1424 | + //////////////////////////////////////////////////////////////////////// | ||
| 1425 | + // check http api | ||
| 1426 | + //////////////////////////////////////////////////////////////////////// | ||
| 1427 | + if (get_http_api_listen() <= 0) { | ||
| 1428 | + ret = ERROR_SYSTEM_CONFIG_INVALID; | ||
| 1429 | + srs_error("directive http_api listen invalid, listen=%d, ret=%d", | ||
| 1430 | + get_http_api_listen(), ret); | ||
| 1431 | + return ret; | ||
| 1432 | + } | ||
| 1433 | + | ||
| 1434 | + //////////////////////////////////////////////////////////////////////// | ||
| 1435 | + // check http stream | ||
| 1436 | + //////////////////////////////////////////////////////////////////////// | ||
| 1437 | + if (get_http_stream_listen() <= 0) { | ||
| 1438 | + ret = ERROR_SYSTEM_CONFIG_INVALID; | ||
| 1439 | + srs_error("directive http_stream listen invalid, listen=%d, ret=%d", | ||
| 1440 | + get_http_stream_listen(), ret); | ||
| 1441 | + return ret; | ||
| 1442 | + } | ||
| 1443 | + | ||
| 1408 | // TODO: FIXME: check others. | 1444 | // TODO: FIXME: check others. |
| 1409 | 1445 | ||
| 1410 | //////////////////////////////////////////////////////////////////////// | 1446 | //////////////////////////////////////////////////////////////////////// |
-
请 注册 或 登录 后发表评论