summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiscomfitor <michael.blumenkrantz@gmail.com>2013-03-22 22:12:05 +0000
committerdiscomfitor <michael.blumenkrantz@gmail.com>2013-03-22 22:12:05 +0000
commitc25f6ca278ab2118276042fd2ffe6efc92ac0bff (patch)
tree841f7f257ed0e8a9a4db7fb28487405f51d31391
parentd028924ea7539098735afeba4ff8f050a1cdb8cc (diff)
some small fixes for azy clients
-rw-r--r--src/lib/azy/azy_content.c3
-rw-r--r--src/lib/azy/azy_events.c5
2 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/azy/azy_content.c b/src/lib/azy/azy_content.c
index d79b9a1..87b859f 100644
--- a/src/lib/azy/azy_content.c
+++ b/src/lib/azy/azy_content.c
@@ -50,7 +50,6 @@ azy_content_buffer_set_(Azy_Content *content, unsigned char *buffer, size_t leng
50 * @param content The content to store the resulting #Azy_Value object in 50 * @param content The content to store the resulting #Azy_Value object in
51 * @param net The object containing the buffer to parse 51 * @param net The object containing the buffer to parse
52 * @return true on success, false on failure 52 * @return true on success, false on failure
53 * @note Currently only JSON parsing is supported here
54 */ 53 */
55Eina_Bool 54Eina_Bool
56azy_content_deserialize(Azy_Content *content, 55azy_content_deserialize(Azy_Content *content,
@@ -71,7 +70,7 @@ azy_content_deserialize(Azy_Content *content,
71 if (net->transport == AZY_NET_TRANSPORT_JSON) 70 if (net->transport == AZY_NET_TRANSPORT_JSON)
72 return azy_content_deserialize_json(content, (char *)EBUF(net->buffer), EBUFLEN(net->buffer)); 71 return azy_content_deserialize_json(content, (char *)EBUF(net->buffer), EBUFLEN(net->buffer));
73 72
74 if (net->transport == AZY_NET_TRANSPORT_XML) 73 if ((net->transport == AZY_NET_TRANSPORT_XML) || (net->transport == AZY_NET_TRANSPORT_ATOM))
75 { 74 {
76 return azy_content_deserialize_xml(content, (char *)EBUF(net->buffer), EBUFLEN(net->buffer)); 75 return azy_content_deserialize_xml(content, (char *)EBUF(net->buffer), EBUFLEN(net->buffer));
77 } 76 }
diff --git a/src/lib/azy/azy_events.c b/src/lib/azy/azy_events.c
index c87a2fb..5eb39e9 100644
--- a/src/lib/azy/azy_events.c
+++ b/src/lib/azy/azy_events.c
@@ -826,7 +826,10 @@ azy_events_recv_progress(Azy_Net *net, const void *data, size_t len)
826 if (net->http.post_headers_buf) 826 if (net->http.post_headers_buf)
827 eina_binbuf_append_length(net->http.post_headers_buf, data, len); 827 eina_binbuf_append_length(net->http.post_headers_buf, data, len);
828 else 828 else
829 eina_binbuf_append_length(net->buffer, data, len); 829 {
830 if (!net->buffer) net->buffer = eina_binbuf_new();
831 eina_binbuf_append_length(net->buffer, data, len);
832 }
830 net->progress += len; 833 net->progress += len;
831 if (net->http.transfer_encoding) 834 if (net->http.transfer_encoding)
832 { 835 {