diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2014-05-03 23:56:50 +0200 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2014-05-03 23:56:50 +0200 |
commit | f6527cc4f7625eb5283eee5392312ad5df70e0f3 (patch) | |
tree | 3818e4732447d3cbeb6e1696144732a84896e130 /decoder.c | |
parent | 2060510aaafcc7eb27fac071334b4f8aa1f3cab2 (diff) | |
download | libsigrokdecode-f6527cc4f7625eb5283eee5392312ad5df70e0f3.tar.gz libsigrokdecode-f6527cc4f7625eb5283eee5392312ad5df70e0f3.zip |
Move srd_check_init() to decoder.c and make it static.
The function srd_check_init() is only used in decoder.c.
Diffstat (limited to 'decoder.c')
-rw-r--r-- | decoder.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -47,12 +47,22 @@ extern GSList *searchpaths; /* session.c */ extern GSList *sessions; +extern int max_session_id; /* module_sigrokdecode.c */ extern SRD_PRIV PyObject *mod_sigrokdecode; /** @endcond */ +static gboolean srd_check_init(void) +{ + if (max_session_id < 0) { + srd_err("Library is not initialized."); + return FALSE; + } else + return TRUE; +} + /** * Returns the list of supported/loaded protocol decoders. * |