1 Star 0 Fork 43

zhongtao/src-iSulad

forked from src-openEuler/iSulad 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-code-improve-for-sandbox.cc.patch 1.14 KB
一键复制 编辑 原始数据 按行查看 历史
jake 提交于 2024-04-02 11:50 . upgrade from upstream
From 9497e03709a035805effd96eaa21f6c221a79e94 Mon Sep 17 00:00:00 2001
From: zhongtao <[email protected]>
Date: Fri, 19 Jan 2024 17:12:30 +0800
Subject: [PATCH 01/43] code improve for sandbox.cc
Signed-off-by: zhongtao <[email protected]>
---
src/daemon/sandbox/sandbox.cc | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/daemon/sandbox/sandbox.cc b/src/daemon/sandbox/sandbox.cc
index 359cfbad..7b6496ed 100644
--- a/src/daemon/sandbox/sandbox.cc
+++ b/src/daemon/sandbox/sandbox.cc
@@ -1086,8 +1086,7 @@ void Sandbox::FillSandboxMetadata(sandbox_metadata* metadata, Errors &error)
metadata->task_address = util_strdup_s(m_taskAddress.c_str());
metadata->net_ns_path = util_strdup_s(m_netNsPath.c_str());
- google::protobuf::util::MessageToJsonString(*m_sandboxConfig.get(), &jsonStr);
- if (jsonStr.length() == 0) {
+ if (!google::protobuf::util::MessageToJsonString(*m_sandboxConfig.get(), &jsonStr).ok()) {
error.Errorf("Failed to get sandbox config json for sandbox: '%s'", m_id.c_str());
ERROR("Failed to get sandbox config json for sandbox: '%s'", m_id.c_str());
}
--
2.34.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/taotao-sauce/src-iSulad.git
[email protected]:taotao-sauce/src-iSulad.git
taotao-sauce
src-iSulad
src-iSulad
master

搜索帮助