Correct a missing yajl1/2 check
authorjbergstroem <bugs@bergstroem.nu>
Wed, 24 Aug 2011 14:25:29 +0000 (16:25 +0200)
committerjbergstroem <bugs@bergstroem.nu>
Wed, 24 Aug 2011 14:25:29 +0000 (16:25 +0200)
Change-Id: Ie3e0380721d88e54cb5630e1c3ecb613790b32b3

src/curl_json.c

index 988ed58..857e276 100644 (file)
@@ -763,7 +763,11 @@ static int cj_curl_perform (cj_t *db, CURL *curl) /* {{{ */
     return (-1);
   }
 
-  status = yajl_parse_complete (db->yajl);
+#if HAVE_YAJL_V2
+    status = yajl_complete_parse(db->yajl);
+#else
+    status = yajl_parse_complete(db->yajl);
+#endif
   if (status != yajl_status_ok)
   {
     unsigned char *errmsg;