Author: ArcRiley Date: 2009-02-27 12:38:45 -0500 (Fri, 27 Feb 2009) New Revision: 1534
Modified: trunk/concordance/include/concordance.h trunk/concordance/src/_core/step.c Log: Changed response method from callback to a message-specific return queue Modified: trunk/concordance/include/concordance.h =================================================================== --- trunk/concordance/include/concordance.h 2009-02-27 16:55:10 UTC (rev 1533) +++ trunk/concordance/include/concordance.h 2009-02-27 17:38:45 UTC (rev 1534) @@ -47,14 +47,13 @@ GMainLoop* mainloop; /* Concordance's Glib mainloop */ GThread* threadid; /* thread ID for mainloop thread */ GAsyncQueue* queueRecv; /* callback queue input */ - GAsyncQueue* queueSend; /* callback queue output */ } concordGlobals; typedef struct { - PyObject* self; - gchar* method; - void (* handler ) (gpointer); - GString* message; + PyObject* self; + gchar* method; + GAsyncQueue* queueSend; /* callback queue output */ + GString* message; } concordCore_QueueMsg; Modified: trunk/concordance/src/_core/step.c =================================================================== --- trunk/concordance/src/_core/step.c 2009-02-27 16:55:10 UTC (rev 1533) +++ trunk/concordance/src/_core/step.c 2009-02-27 17:38:45 UTC (rev 1534) @@ -119,19 +119,23 @@ /* only use output when non-empty - Py_ssize_t PyUnicode_GetSize (PyObject *unicode); + Py_ssize_t PyUnicode_GetSize (PyObject *unicode); */ if (PyUnicode_GetSize(output)) { /* convert unicode to utf8, reusing popped->message for response - GString* g_string_assign (GString *string, - const gchar *rval); - void g_async_queue_push (GAsyncQueue *queue, - gpointer data); + GString* g_string_assign (GString *string, + const gchar *rval); */ popped->message = g_string_assign(popped->message, concordPyUnicodeToUTF8(output)); - g_async_queue_push(globals->queueSend, popped); + + /* send response with the included self-addressed stamped envelope + + void g_async_queue_push (GAsyncQueue *queue, + gpointer data); + */ + g_async_queue_push(popped->queueSend, popped); } else /* free message struct since we didn't use it */ _______________________________________________ PySoy-SVN mailing list PySoy-SVN@pysoy.org http://www.pysoy.org/mailman/listinfo/pysoy-svn