break;
}
+ case STREAM_PLUGIN_OBJECT:
+ {
+ OBJECT_DBR obj_r;
+ char *buf = rec->data;
+ num_plugin_objects++;
+
+ obj_r.parse_plugin_object_string(&buf);
+
+ // Need to get new jobId if possible
+ mjcr = get_jcr_by_session(rec->VolSessionId, rec->VolSessionTime);
+ if (!mjcr) {
+ Pmsg2(000, _("Could not find SessId=%d SessTime=%d for PluginObject record.\n"),
+ rec->VolSessionId, rec->VolSessionTime);
+ break;
+ }
+
+ obj_r.JobId = mjcr->JobId;
+
+ /* Look if we have already the same object */
+ if (db_get_plugin_object_record(mjcr, db, &obj_r)) {
+ if (verbose) {
+ Pmsg1(0, _("RESTORE_OBJECT: Found Plugin Object \"%s\" in the catalog\n"), obj_r.ObjectName);
+ }
+ } else if (update_db) {
+ /* Send it */
+ Pmsg1(0, _("PLUGIN_OBJECT: Inserting Plugin Object \"%s\" into the catalog\n"), obj_r.ObjectName);
+ if (!db_create_object_record(mjcr, db, &obj_r)) {
+ Jmsg1(mjcr, M_FATAL, 0, _("Plugin object create error. %s"), db_strerror(db));
+ }
+ } else {
+ Pmsg1(0, _("PLUGIN_OBJECT: Found Plugin Object \"%s\" on the volume\n"), obj_r.ObjectName);
+ }
+
+ break;
+ }
+
/* Data stream */
case STREAM_WIN32_DATA:
case STREAM_FILE_DATA: