struct srd_probe *p;
GSList *l;
+ if (!srd_check_init())
+ return SRD_ERR;
+
if (!module_name)
return SRD_ERR_ARG;
PyObject *py_str;
char *doc;
+ if (!srd_check_init())
+ return NULL;
+
+ if (!dec)
+ return NULL;
+
if (!PyObject_HasAttrString(dec->py_mod, "__doc__"))
return NULL;
struct srd_session *sess;
GSList *l;
+ if (!srd_check_init())
+ return SRD_ERR;
+
+ if (!dec)
+ return SRD_ERR_ARG;
+
srd_dbg("Unloading protocol decoder '%s'.", dec->name);
/*
GError *error;
const gchar *direntry;
+ if (!srd_check_init())
+ return SRD_ERR;
+
if (!(dir = g_dir_open(DECODERS_DIR, 0, &error))) {
srd_err("Unable to open %s for reading.", DECODERS_DIR);
return SRD_ERR_DECODERS_DIR;
return SRD_OK;
}
+/* @private */
+SRD_PRIV gboolean srd_check_init(void)
+{
+ if (max_session_id < 0) {
+ srd_err("Library is not initialized.");
+ return FALSE;
+ } else
+ return TRUE;
+}
+
/** @} */