Modify interface to get string from entry
[cascardo/atompub.git] / frontend / cgi / cgi.c
index 7e80b7d..5497941 100644 (file)
@@ -45,9 +45,13 @@ cgi_serve_request (AtomCtx *ctx)
       iri_delete (iri);
       if (atom)
        {
+         char * str;
+         size_t len;
          char *header = "Content-type: application/atom+xml\n\n";
          write (1, header, strlen (header));
-         write (1, atom_entry_string (atom), atom_entry_len (atom));
+         atom_entry_string (atom, &str, &len);
+         write (1, str, len);
+         g_free (str);
          atom_entry_delete (atom);
        }
       else if ((error = atom_error_get (ctx)) != NULL)