comparison Plugins/Samples/Basic/Plugin.c @ 1200:1e1390665639 db-changes

fix sample
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 23 Oct 2014 14:42:11 +0200
parents a843ee8bb903
children f1c01451a8ee
comparison
equal deleted inserted replaced
1199:a843ee8bb903 1200:1e1390665639
260 sprintf(info, "Change %d on resource %s of type %d", changeType, resourceId, resourceType); 260 sprintf(info, "Change %d on resource %s of type %d", changeType, resourceId, resourceType);
261 OrthancPluginLogWarning(context, info); 261 OrthancPluginLogWarning(context, info);
262 262
263 if (changeType == OrthancPluginChangeType_NewInstance) 263 if (changeType == OrthancPluginChangeType_NewInstance)
264 { 264 {
265 sprintf(info, "/instances/%s/metadata/ReceptionDate", resourceId); 265 sprintf(info, "/instances/%s/metadata/AnonymizedFrom", resourceId);
266 if (OrthancPluginRestApiGet(context, &tmp, info) == 0) 266 if (OrthancPluginRestApiGet(context, &tmp, info) == 0)
267 { 267 {
268 sprintf(info, " Instance %s comes from the anonymization of instance %s", 268 sprintf(info, " Instance %s comes from the anonymization of instance", resourceId);
269 resourceId, (const char*) tmp.data); 269 strncat(info, (const char*) tmp.data, tmp.size);
270 OrthancPluginLogWarning(context, info); 270 OrthancPluginLogWarning(context, info);
271 OrthancPluginFreeMemoryBuffer(context, &tmp); 271 OrthancPluginFreeMemoryBuffer(context, &tmp);
272 } 272 }
273 } 273 }
274 274