本文整理汇总了C++中FILE_INFO::merge_info方法的典型用法代码示例。如果您正苦于以下问题:C++ FILE_INFO::merge_info方法的具体用法?C++ FILE_INFO::merge_info怎么用?C++ FILE_INFO::merge_info使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FILE_INFO
的用法示例。
在下文中一共展示了FILE_INFO::merge_info方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handle_scheduler_reply
//.........这里部分代码省略.........
}
} else {
msg_printf(project, MSG_INTERNAL_ERROR,
"Missing code sign key signature"
);
}
}
}
// copy new entities to client state
//
for (i=0; i<sr.apps.size(); i++) {
APP* app = lookup_app(project, sr.apps[i].name);
if (app) {
strcpy(app->user_friendly_name, sr.apps[i].user_friendly_name);
} else {
app = new APP;
*app = sr.apps[i];
retval = link_app(project, app);
if (retval) {
msg_printf(project, MSG_INTERNAL_ERROR,
"Can't handle application %s in scheduler reply", app->name
);
delete app;
} else {
apps.push_back(app);
}
}
}
FILE_INFO* fip;
for (i=0; i<sr.file_infos.size(); i++) {
fip = lookup_file_info(project, sr.file_infos[i].name);
if (fip) {
fip->merge_info(sr.file_infos[i]);
} else {
fip = new FILE_INFO;
*fip = sr.file_infos[i];
retval = link_file_info(project, fip);
if (retval) {
msg_printf(project, MSG_INTERNAL_ERROR,
"Can't handle file %s in scheduler reply", fip->name
);
delete fip;
} else {
file_infos.push_back(fip);
}
}
}
for (i=0; i<sr.file_deletes.size(); i++) {
fip = lookup_file_info(project, sr.file_deletes[i].c_str());
if (fip) {
if (log_flags.file_xfer_debug) {
msg_printf(project, MSG_INFO,
"[file_xfer_debug] Got server request to delete file %s",
fip->name
);
}
fip->sticky = false;
}
}
for (i=0; i<sr.app_versions.size(); i++) {
if (project->anonymous_platform) {
msg_printf(project, MSG_INTERNAL_ERROR,
"App version returned from anonymous platform project; ignoring"
);
continue;