<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -7,14 +7,14 @@ EBINDIR=$(top_builddir)/ebin
 
 ERL=erl $(ERLCFLAGS) -pa ebin $(ERLFLAGS) -noshell -eval
 
-mod_scribe_FILES = ejabberd_auth_couchdb.erl auth_couchdb_test.erl 
-mod_scribe_BEAMS = ejabberd_auth_couchdb.beam auth_couchdb_test.beam
+mod_ejabberd_couch_FILES = ejabberd_couch.erl ejabberd_auth_couchdb.erl auth_couchdb_test.erl 
+mod_ejabberd_couch_BEAMS = ejabberd_couch.beam ejabberd_auth_couchdb.beam auth_couchdb_test.beam
 
-EXTRA_DIST = ${addprefix $(ESRCDIR)/, $(mod_scribe_FILES)}
+EXTRA_DIST = ${addprefix $(ESRCDIR)/, $(mod_ejabberd_couch_FILES)}
 
-mod_scribedir = $(EJABBERD_PREFIX)/ebin
-mod_scribe_DATA = ${addprefix $(EBINDIR)/, $(mod_scribe_BEAMS)}
-CLEANFILES = $(mod_scribe_DATA)
+mod_ejabberd_couchdir = $(EJABBERD_PREFIX)/ebin
+mod_ejabberd_couch_DATA = ${addprefix $(EBINDIR)/, $(mod_ejabberd_couch_BEAMS)}
+CLEANFILES = $(mod_ejabberd_couch_DATA)
 
 test: all
 	$(ERL) 'auth_couchdb_test:test(), halt().'</diff>
      <filename>Makefile.am</filename>
    </modified>
    <modified>
      <diff>@@ -2,8 +2,10 @@
 
 -author(&quot;tofu@collecta.com&quot;).
 
+-include(&quot;ejabberd.hrl&quot;).
+
 -export([init/1,
-	 doc_delete/3,
+	 doc_delete/2,
 	 doc_update/3,
 	 doc_create/3,
 	 doc_get/2
@@ -19,7 +21,7 @@ init(Opts) -&gt;
     ok.
 
 get_url(Name, Id) -&gt;
-    CouchUrl = &quot;http://&quot;++get_opt(host)++&quot;:&quot;++get_opt(port)++&quot;/&quot;,
+    CouchUrl = &quot;http://&quot;++get_opt(host, &quot;127.0.0.1&quot;)++&quot;:&quot;++get_opt(port, &quot;5984&quot;)++&quot;/&quot;,
     CouchUrl ++ &quot;/&quot; ++ Name ++ &quot;/&quot; ++ Id.
     
 send_request(Url, Type, Doc) -&gt;
@@ -34,12 +36,12 @@ send_request(Url, Type, Doc) -&gt;
                                 [{&quot;Content-Type&quot;, &quot;application/json&quot;}],
                                 Type, EncDoc,
 				Options) of
-        {ok, &quot;200&quot;, _Headers, Payload} = Res-&gt;
+        {ok, &quot;200&quot;, _Headers, Payload} -&gt;
 	    rfc4627:decode(Payload);
-        {ok, &quot;201&quot;, _Headers, Payload} = Res-&gt;
+        {ok, &quot;201&quot;, _Headers, Payload} -&gt;
 	    rfc4627:decode(Payload);
         Error -&gt;
-            ?ERROR(&quot;~p sending ~p to ~p~n&quot;,
+            ?ERROR_MSG(&quot;~p sending ~p to ~p~n&quot;,
 		   [Error, Doc, Url]),
             throw({error, storage_error, Error})
     end.
@@ -57,7 +59,7 @@ doc_create(Name, Id, Value) -&gt;
     send_request(Url, put, Value).
 
 doc_get(Name, Id) -&gt;
-    Url = CouchUrl ++ &quot;/&quot; ++ Id,
+    Url = get_url(Name, Id),
     send_request(Url, get, []).
 
 </diff>
      <filename>src/ejabberd_couch.erl</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>cd6227974120f8b8dc0d25360a4c78b588eaebbe</id>
    </parent>
  </parents>
  <author>
    <name>Christopher 'Tofu' Zorn</name>
    <email>tofu@stanziq.com</email>
  </author>
  <url>http://github.com/twonds/ejabberd_couchdb/commit/b2b5ff3a477706c927ed83e277c6f42d21ba5950</url>
  <id>b2b5ff3a477706c927ed83e277c6f42d21ba5950</id>
  <committed-date>2009-06-10T07:13:03-07:00</committed-date>
  <authored-date>2009-06-10T07:13:03-07:00</authored-date>
  <message>fix syntax and other bugs, we can compile and test now</message>
  <tree>508f49a3d9a591d264d875399cda23d9859d445e</tree>
  <committer>
    <name>Christopher 'Tofu' Zorn</name>
    <email>tofu@stanziq.com</email>
  </committer>
</commit>
