Exemple #1
0
/*
 * construct Report (zerovm report to proxy) part of manifest structure
 * note: malloc(). must be called only once
 */
void SetupReportSettings(struct NaClApp *nap)
{
  /* allocate space for report */
  struct Report *report = malloc(sizeof(*report)); // ### memory must be allocated before nexe start
  COND_ABORT(!report, "cannot allocate memory for report\n");

  /* set results */
  report->etag = MakeEtag(nap);
  report->content_type = "application/octet-stream"; // where to get it?
  report->x_object_meta_tag = "Format:Pickle"; // where to get it?

  /* ### ret codes must be set from main() */
  nap->manifest->report = report;
}
Exemple #2
0
/*
 * construct Report (zerovm report to proxy) part of manifest structure
 * note: malloc(). must be called only once
 */
void SetupReportSettings(struct NaClApp *nap)
{
  /*
   * allocate space for report
   * todo: memory must be allocated before nexe start
   */
  struct Report *report = malloc(sizeof(*report));
  COND_ABORT(!report, "cannot allocate memory for report\n");

  /* set results. note: etag is temporary disabled  */
  report->etag = MakeEtag(nap);

  /* get custom attributes from the manifest */
  report->content_type = get_value_by_key(nap, "ContentType");
  report->x_object_meta_tag = get_value_by_key(nap, "XObjectMetaTag");

  nap->manifest->report = report;
}