]> sigrok.org Git - libsigrok.git/blobdiff - session.c
sr: moved sigrok.h so libsigrok/libsigrok.h
[libsigrok.git] / session.c
index 5e1d54a1e86f5d2b8f9dac4129700bab08c823c2..89ea5ad4adf18312698c80a829dee5e4a16c1e31 100644 (file)
--- a/session.c
+++ b/session.c
@@ -22,8 +22,8 @@
 #include <unistd.h>
 #include <string.h>
 #include <glib.h>
-#include "sigrok.h"
-#include "sigrok-internal.h"
+#include "libsigrok.h"
+#include "libsigrok-internal.h"
 
 /* demo.c. TODO: Should not be global! */
 extern SR_PRIV GIOChannel channels[2];
@@ -217,7 +217,9 @@ static int sr_session_run_poll(void)
 
                /* Construct g_poll()'s array. */
                if (!(fds = g_try_malloc(sizeof(GPollFD) * num_sources))) {
-                       sr_err("session: %s: fds malloc failed", __func__);
+                       /* Not enough memory, or num_sources was 0. */
+                       sr_err("session: %s: fds malloc failed "
+                              "(num_sources was %d).", __func__, num_sources);
                        return SR_ERR_MALLOC;
                }
                for (i = 0; i < num_sources; i++) {