opkg: set callbacks before opkg_conf_init
authorticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Mon, 15 Dec 2008 05:17:51 +0000 (05:17 +0000)
committerticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Mon, 15 Dec 2008 05:17:51 +0000 (05:17 +0000)
git-svn-id: http://opkg.googlecode.com/svn/trunk@113 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

libopkg/libopkg.c

index ba1b2e0..dba1983 100644 (file)
@@ -477,6 +477,10 @@ opkg_op (int argc, char *argv[])
              !strcmp(cmd_name,"status") )
            args.noreadfeedsfile = 1;
 
              !strcmp(cmd_name,"status") )
            args.noreadfeedsfile = 1;
 
+       opkg_cb_message = default_opkg_message_callback;
+       opkg_cb_response = default_opkg_response_callback;
+       opkg_cb_status = default_opkg_status_callback;
+
 
        err = opkg_conf_init (&opkg_conf, &args);
        if (err)
 
        err = opkg_conf_init (&opkg_conf, &args);
        if (err)
@@ -486,9 +490,6 @@ opkg_op (int argc, char *argv[])
 
        args_deinit (&args);
 
 
        args_deinit (&args);
 
-       opkg_cb_message = default_opkg_message_callback;
-       opkg_cb_response = default_opkg_response_callback;
-       opkg_cb_status = default_opkg_status_callback;
        if ( strcmp(cmd_name, "files")==0)
             opkg_cb_list = default_opkg_files_callback;
        else
        if ( strcmp(cmd_name, "files")==0)
             opkg_cb_list = default_opkg_files_callback;
        else