diff options
author | ticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2008-12-14 23:22:05 (EST) |
---|---|---|
committer | ticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2008-12-14 23:22:05 (EST) |
commit | 868cbd739052719d5e0580a0fda6101dada1ce1e (patch) | |
tree | 58b735c509e730e6624586db8e188b3e7a5678c2 | |
parent | 911f5d0e216d996a185f3ebf12290ca9609dafb4 (diff) |
opkg: correct the name of the state changed callback and run it when appropriate
git-svn-id: http://opkg.googlecode.com/svn/trunk@32 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
-rw-r--r-- | opkg_state.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/opkg_state.c b/opkg_state.c index 3dbd6c6..2cc8594 100644 --- a/opkg_state.c +++ b/opkg_state.c @@ -33,7 +33,7 @@ static char *state_strings[] = -opkg_state_changed_callback opkg_cb_state; +opkg_state_changed_callback opkg_cb_state_changed = NULL; static opkg_state_t opkg_state = 0; static char *opkg_state_data = NULL; @@ -55,6 +55,12 @@ opkg_set_current_state (opkg_state_t state, const char *data) opkg_state = state; + if (opkg_cb_state_changed) + { + opkg_cb_state_changed (opkg_state, opkg_state_data); + } + + printf ("opkg state set to %s: %s\n", state_strings[state], data); } |