summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Dritschler <timo.dritschler@kit.edu>2015-04-15 15:15:37 +0200
committerTimo Dritschler <timo.dritschler@kit.edu>2015-04-15 15:15:37 +0200
commit019504a32e56d5bd6ae7b0cbdcbec2e114e6f638 (patch)
treecc0b1ce91044cf0e1a816c9e2a34b6191f5310b5
parentb0ffd9f0a5278f2ef81a267af3c8f72ab8d0f7c2 (diff)
downloadkiro-019504a32e56d5bd6ae7b0cbdcbec2e114e6f638.tar.gz
kiro-019504a32e56d5bd6ae7b0cbdcbec2e114e6f638.tar.bz2
kiro-019504a32e56d5bd6ae7b0cbdcbec2e114e6f638.tar.xz
kiro-019504a32e56d5bd6ae7b0cbdcbec2e114e6f638.zip
Fixed a bug in KiroSb
Removed a debugging statement which was causing the KiroSb to sync permanently Added gi.introspection annotations to some of the KiroSb documentation
-rw-r--r--src/kiro-sb.c6
-rw-r--r--src/kiro-sb.h8
2 files changed, 8 insertions, 6 deletions
diff --git a/src/kiro-sb.c b/src/kiro-sb.c
index e5a6769..6ec671c 100644
--- a/src/kiro-sb.c
+++ b/src/kiro-sb.c
@@ -176,7 +176,7 @@ idle_func (KiroSbPrivate *priv)
gulong old_offset = header->offset;
kiro_client_sync_partial (priv->client, 0, sizeof(struct KiroTrbInfo), 0);
kiro_trb_refresh (priv->trb);
- if (((old_offset != header->offset) || TRUE) && 0 < header->offset) {
+ if ((old_offset != header->offset) && 0 < header->offset) {
gulong offset = (gulong) (kiro_trb_get_element (priv->trb, -1) - kiro_trb_get_raw_buffer (priv->trb));
kiro_client_sync_partial (priv->client, offset, kiro_trb_get_element_size (priv->trb), offset);
g_hook_list_invoke_check (&(priv->callbacks), FALSE);
@@ -302,10 +302,10 @@ kiro_sb_push (KiroSb *self, void *data_in)
void *
kiro_sb_push_dma (KiroSb *self)
{
- g_return_val_if_fail (self != NULL, FALSE);
+ g_return_val_if_fail (self != NULL, NULL);
KiroSbPrivate *priv = KIRO_SB_GET_PRIVATE (self);
- g_return_val_if_fail (priv->initialized == 1, FALSE);
+ g_return_val_if_fail (priv->initialized == 1, NULL);
return kiro_trb_dma_push (priv->trb);
}
diff --git a/src/kiro-sb.h b/src/kiro-sb.h
index 0f155c3..4736c75 100644
--- a/src/kiro-sb.h
+++ b/src/kiro-sb.h
@@ -268,7 +268,8 @@ void kiro_sb_thaw (KiroSb *sb);
* Data might either change by pushing (in case of a 'serving' #KiroSb) or
* after (automatic or manual) syncing (in case of a 'cloning' #KiroSb).
*
- * Returns: (transfer none): A void pointer the stored data
+ * Returns: (transfer none) (type gulong):
+ * A void pointer the stored data
* Note:
* The returned pointer to the element might become invalid at any time by
* automatic or manual sync. Under no circumstances might the returned pointer
@@ -287,7 +288,7 @@ void* kiro_sb_get_data (KiroSb *sb);
* Calling this function will do the same thing as kiro_sb_get_data, but it
* will internaly wait until new data has arived before returning it.
*
- * Returns: (transfer none): A void pointer the stored data
+ * Returns: (transfer none) (type gulong): A void pointer the stored data
* Note:
* The returned pointer to the element might become invalid at any time by
* automatic or manual sync. Under no circumstances might the returned pointer
@@ -325,7 +326,8 @@ gboolean kiro_sb_push (KiroSb *sb, void *data);
* This operation is only valid for a 'serving' #KiroSb. Calling this
* function on a 'cloning' #KiroSb will allways return a %NULL pointer.
*
- * Returns: (transfer none): A pointer to the memory where the new data should be stored
+ * Returns: (transfer none) (type gulong):
+ * A pointer to the memory where the new data should be stored
* Note:
* It is the users responsibility to ensure no more data is written to the
* pointed memory then was specified with the initial call to kiro_sb_serve or