summaryrefslogtreecommitdiffstats
path: root/src/kiro-sb.c
diff options
context:
space:
mode:
authorTimo Dritschler <timo.dritschler@kit.edu>2015-03-30 15:16:52 +0200
committerTimo Dritschler <timo.dritschler@kit.edu>2015-03-30 15:16:52 +0200
commit5b9d03456d2f197bb398eef7893e663701c95238 (patch)
tree6b3036bf6e475ad069a91043ad3d540424bbdf00 /src/kiro-sb.c
parent13db03534b26304cab537953f99c2db8755d753b (diff)
downloadkiro-5b9d03456d2f197bb398eef7893e663701c95238.tar.gz
kiro-5b9d03456d2f197bb398eef7893e663701c95238.tar.bz2
kiro-5b9d03456d2f197bb398eef7893e663701c95238.tar.xz
kiro-5b9d03456d2f197bb398eef7893e663701c95238.zip
Added new optional address and port paramters to kiro_sb_serve
Diffstat (limited to 'src/kiro-sb.c')
-rw-r--r--src/kiro-sb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/kiro-sb.c b/src/kiro-sb.c
index 0c044fe..624ead2 100644
--- a/src/kiro-sb.c
+++ b/src/kiro-sb.c
@@ -187,7 +187,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) && 0 < header->offset) {
+ if (((old_offset != header->offset) || TRUE) && 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);
@@ -218,7 +218,7 @@ kiro_sb_thaw (KiroSb *self)
gboolean
-kiro_sb_serve (KiroSb *self, gulong size)
+kiro_sb_serve (KiroSb *self, gulong size, const gchar *addr, const gchar *port)
{
g_return_val_if_fail (self != NULL, FALSE);
@@ -236,8 +236,10 @@ kiro_sb_serve (KiroSb *self, gulong size)
void *buff = kiro_trb_get_raw_buffer (priv->trb);
gulong b_size = kiro_trb_get_raw_size (priv->trb);
+ const gchar *port_internal = port ? port : "60010";
+
priv->server = kiro_server_new ();
- if (0 > kiro_server_start (priv->server, NULL, "60010", buff, b_size)) {
+ if (0 > kiro_server_start (priv->server, addr, port_internal, buff, b_size)) {
g_debug ("Failed to start KIRO Server");
kiro_server_free (priv->server);
kiro_trb_free (priv->trb);