CGI frontend uses AtomResource instead of AtomEntry
authorThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Sat, 9 Aug 2008 22:56:39 +0000 (19:56 -0300)
committerThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Sun, 10 Aug 2008 02:42:05 +0000 (23:42 -0300)
frontend/cgi/cgi.c

index 5497941..73adcda 100644 (file)
@@ -37,9 +37,10 @@ cgi_serve_request (AtomCtx *ctx)
     }
   if (!strcmp (method, "GET"))
     {
-      IRI *iri = iri_new ();
-      AtomEntry *atom;
+      IRI *iri;
+      AtomResource *atom;
       AtomError *error;
+      iri = iri_new ();
       iri_set_path (iri, path);
       atom = atom_retrieve_resource (ctx, iri);
       iri_delete (iri);
@@ -49,10 +50,10 @@ cgi_serve_request (AtomCtx *ctx)
          size_t len;
          char *header = "Content-type: application/atom+xml\n\n";
          write (1, header, strlen (header));
-         atom_entry_string (atom, &str, &len);
+         atom_resource_string (atom, &str, &len);
          write (1, str, len);
          g_free (str);
-         atom_entry_delete (atom);
+         atom_resource_delete (atom);
        }
       else if ((error = atom_error_get (ctx)) != NULL)
        {