正在显示
1 个修改的文件
包含
4 行增加
和
0 行删除
| @@ -1197,21 +1197,25 @@ int SrsConfig::reload_http_api(SrsConfDirective* old_root) | @@ -1197,21 +1197,25 @@ int SrsConfig::reload_http_api(SrsConfDirective* old_root) | ||
| 1197 | srs_trace("reload enabled modified http_api success."); | 1197 | srs_trace("reload enabled modified http_api success."); |
| 1198 | 1198 | ||
| 1199 | if (!srs_directive_equals(old_http_api->get("crossdomain"), new_http_api->get("crossdomain"))) { | 1199 | if (!srs_directive_equals(old_http_api->get("crossdomain"), new_http_api->get("crossdomain"))) { |
| 1200 | + for (it = subscribes.begin(); it != subscribes.end(); ++it) { | ||
| 1200 | ISrsReloadHandler* subscribe = *it; | 1201 | ISrsReloadHandler* subscribe = *it; |
| 1201 | if ((ret = subscribe->on_reload_http_api_crossdomain()) != ERROR_SUCCESS) { | 1202 | if ((ret = subscribe->on_reload_http_api_crossdomain()) != ERROR_SUCCESS) { |
| 1202 | srs_error("notify subscribes http_api crossdomain modified failed. ret=%d", ret); | 1203 | srs_error("notify subscribes http_api crossdomain modified failed. ret=%d", ret); |
| 1203 | return ret; | 1204 | return ret; |
| 1204 | } | 1205 | } |
| 1205 | } | 1206 | } |
| 1207 | + } | ||
| 1206 | srs_trace("reload crossdomain modified http_api success."); | 1208 | srs_trace("reload crossdomain modified http_api success."); |
| 1207 | 1209 | ||
| 1208 | if (!srs_directive_equals(old_http_api->get("raw_api"), new_http_api->get("raw_api"))) { | 1210 | if (!srs_directive_equals(old_http_api->get("raw_api"), new_http_api->get("raw_api"))) { |
| 1211 | + for (it = subscribes.begin(); it != subscribes.end(); ++it) { | ||
| 1209 | ISrsReloadHandler* subscribe = *it; | 1212 | ISrsReloadHandler* subscribe = *it; |
| 1210 | if ((ret = subscribe->on_reload_http_api_raw_api()) != ERROR_SUCCESS) { | 1213 | if ((ret = subscribe->on_reload_http_api_raw_api()) != ERROR_SUCCESS) { |
| 1211 | srs_error("notify subscribes http_api raw_api modified failed. ret=%d", ret); | 1214 | srs_error("notify subscribes http_api raw_api modified failed. ret=%d", ret); |
| 1212 | return ret; | 1215 | return ret; |
| 1213 | } | 1216 | } |
| 1214 | } | 1217 | } |
| 1218 | + } | ||
| 1215 | srs_trace("reload raw_api modified http_api success."); | 1219 | srs_trace("reload raw_api modified http_api success."); |
| 1216 | 1220 | ||
| 1217 | return ret; | 1221 | return ret; |
-
请 注册 或 登录 后发表评论