diff options
-rw-r--r-- | response.c | 8 | ||||
-rw-r--r-- | signalobject.h | 4 |
2 files changed, 6 insertions, 6 deletions
@@ -15,7 +15,7 @@ extern GAsyncQueue* stdinQueue; //our queue SignalObject* signalObject; //the signal object which registered the signal id //write output to client -static gssize writeOutput(GPollableOutputStream* stream, gchar* data, gssize size); +static gssize writeOutput(GPollableOutputStream* stream, gchar* data); //callback for client output, this is where the queue messages are sent to the client gboolean cbClientOutput(gpointer data, gpointer additional) @@ -89,9 +89,9 @@ gboolean cbClientInput(gpointer data, gpointer additional) } //write output to client -static gssize writeOutput(GPollableOutputStream* stream, gchar* data, gssize size) +static gssize writeOutput(GPollableOutputStream* stream, gchar* data) { - return g_pollable_output_stream_write_nonblocking(stream, data, size, NULL, NULL); + return g_pollable_output_stream_write_nonblocking(stream, data, strlen(data), NULL, NULL); } //initialize the signals @@ -138,7 +138,7 @@ void responseCb(gpointer instance, GObject *arg1, gpointer user_data) strcat(out, "\n"); } - written = data->cb(stream, out, strlen(out)); + written = data->cb(stream, out); if (written == -1) { g_print("Could not send message to client\n"); } diff --git a/signalobject.h b/signalobject.h index dedb9b8..6abf273 100644 --- a/signalobject.h +++ b/signalobject.h @@ -22,7 +22,7 @@ typedef struct _SignalObjectClass SignalObjectClass; struct _SignalObject { GObject parentInstance; gpointer instance; - gssize (*cb)(GPollableOutputStream* stream, gchar* data, gssize size); + gssize (*cb)(GPollableOutputStream* stream, gchar* data); GPollableInputStream* inStream; GPollableOutputStream* outStream; gchar* data; @@ -32,7 +32,7 @@ struct _SignalObject { struct _SignalObjectClass { GObjectClass parent_class; gpointer instance; - gssize (*cb)(GPollableOutputStream* stream, gchar* data, gssize size); + gssize (*cb)(GPollableOutputStream* stream, gchar* data); GPollableInputStream* inStream; GPollableOutputStream* outStream; gchar* data; |