]> Pileus Git - grits/commitdiff
debugging
authorAndy Spencer <andy753421@gmail.com>
Fri, 29 May 2009 06:02:49 +0000 (06:02 +0000)
committerAndy Spencer <andy753421@gmail.com>
Fri, 29 May 2009 06:02:49 +0000 (06:02 +0000)
TODO
configure.ac
src/data.c
src/wsr88ddec.c

diff --git a/TODO b/TODO
index bad23e9f4fc1eae537ac087fe8b48a026cbd32a3..98e571df32dff66dea0edd2b787e94b514f3b619 100644 (file)
--- a/TODO
+++ b/TODO
@@ -5,7 +5,6 @@ Road plan
   * Pre-load textures and polys in OpenGL
 
 0.x - Misc
   * Pre-load textures and polys in OpenGL
 
 0.x - Misc
-  * Resume downloads (back to CURL/Soup)
   * Configuration file
     * Default site
     * Keybindings?
   * Configuration file
     * Default site
     * Keybindings?
index d8946640ea22d0d78859004f34a0cce2faae655b..bd6a5399e734d803d2403e452aa1118c2f5de512 100644 (file)
@@ -9,7 +9,7 @@ PKG_PROG_PKG_CONFIG
 GTK_DOC_CHECK(1.9)
 
 # Check for required packages
 GTK_DOC_CHECK(1.9)
 
 # Check for required packages
-PKG_CHECK_MODULES(SOUP, libsoup-2.4)
+PKG_CHECK_MODULES(SOUP, libsoup-2.4 >= 2.26)
 PKG_CHECK_MODULES(GLIB, gio-2.0 gmodule-export-2.0 gobject-2.0 gthread-2.0)
 PKG_CHECK_MODULES(GTK,  gtk+-2.0 gtkglext-1.0)
 
 PKG_CHECK_MODULES(GLIB, gio-2.0 gmodule-export-2.0 gobject-2.0 gthread-2.0)
 PKG_CHECK_MODULES(GTK,  gtk+-2.0 gtkglext-1.0)
 
index 9878bdc2278c0eb17ba95a2baea505d0002430f2..4b975162a7f3aec9caea403f94760d566fd9acfc 100644 (file)
@@ -36,7 +36,7 @@ static FILE *fopen_p(const gchar *path, const gchar *mode)
 {
        gchar *parent = g_path_get_dirname(path);
        if (!g_file_test(parent, G_FILE_TEST_EXISTS))
 {
        gchar *parent = g_path_get_dirname(path);
        if (!g_file_test(parent, G_FILE_TEST_EXISTS))
-               g_mkdir_with_parents(path, 0755);
+               g_mkdir_with_parents(parent, 0755);
        g_free(parent);
        return fopen(path, mode);
 }
        g_free(parent);
        return fopen(path, mode);
 }
@@ -45,10 +45,13 @@ static void cache_file_cb(SoupSession *session, SoupMessage *message, gpointer _
 {
        cache_file_end_t *info = _info;
        gchar *uri = soup_uri_to_string(soup_message_get_uri(message), FALSE);
 {
        cache_file_end_t *info = _info;
        gchar *uri = soup_uri_to_string(soup_message_get_uri(message), FALSE);
-       g_debug("data: cache_file_cb ([%s]->[%s])", uri, info->local);
+       g_debug("data: cache_file_cb");
 
        if (!SOUP_STATUS_IS_SUCCESSFUL(message->status_code)) {
 
        if (!SOUP_STATUS_IS_SUCCESSFUL(message->status_code)) {
-               g_warning("data: error copying file ([%s]->[%s])", uri, info->local);
+               g_warning("data: cache_file_cb - error copying file, status=%d\n"
+                               "\tsrc=%s\n"
+                               "\tdst=%s",
+                               message->status_code, uri, info->local);
        } else {
                gint wrote = fwrite(message->response_body->data,  1,
                                message->response_body->length, info->fp);
        } else {
                gint wrote = fwrite(message->response_body->data,  1,
                                message->response_body->length, info->fp);
index 107f279265e5e95e0793c0332393f3c698283774..12adaa1256f663eb849d60a5b2c9656d49bc641d 100644 (file)
@@ -89,13 +89,14 @@ int main(int argc, char **argv)
 
        //debug("reading body\n");
        while ((st = fread(&size, 1, 4, input))) {
 
        //debug("reading body\n");
        while ((st = fread(&size, 1, 4, input))) {
+               //debug("size=%08x\n", size);
                //debug("read %u bytes\n", st);
                //fwrite(&size, 1, 4, output); // DEBUG
                size = abs(ntohl(size));
                if (size < 0)
                        return 0;
                //debug("size = %x\n", size);
                //debug("read %u bytes\n", st);
                //fwrite(&size, 1, 4, output); // DEBUG
                size = abs(ntohl(size));
                if (size < 0)
                        return 0;
                //debug("size = %x\n", size);
-               if (size > 10*1024*1024)
+               if (size > 20*1024*1024)
                        err(1, "sanity check failed, buf is to big: %d", size);
                buf = realloc(buf, size);
                fread (buf, 1, size, input);
                        err(1, "sanity check failed, buf is to big: %d", size);
                buf = realloc(buf, size);
                fread (buf, 1, size, input);