[Opensrf-commits] r1854 - in trunk: include/opensrf src/libopensrf (scottmk)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Nov 15 13:39:48 EST 2009
Author: scottmk
Date: 2009-11-15 13:39:44 -0500 (Sun, 15 Nov 2009)
New Revision: 1854
Modified:
trunk/include/opensrf/osrf_message.h
trunk/src/libopensrf/osrf_message.c
Log:
Move the libxml headers out of the header and into the
implementation file.
The files that #include osrf_message.h compile just fine
without the nested libxml headers, and there's no reason
to make the compiler paw through them.
M include/opensrf/osrf_message.h
M src/libopensrf/osrf_message.c
Modified: trunk/include/opensrf/osrf_message.h
===================================================================
--- trunk/include/opensrf/osrf_message.h 2009-11-15 18:15:31 UTC (rev 1853)
+++ trunk/include/opensrf/osrf_message.h 2009-11-15 18:39:44 UTC (rev 1854)
@@ -11,14 +11,6 @@
#include <opensrf/log.h>
#include <opensrf/osrf_json.h>
-
-/* libxml stuff for the config reader */
-#include <libxml/xmlmemory.h>
-#include <libxml/parser.h>
-#include <libxml/xpath.h>
-#include <libxml/xpathInternals.h>
-#include <libxml/tree.h>
-
#ifdef __cplusplus
extern "C" {
#endif
Modified: trunk/src/libopensrf/osrf_message.c
===================================================================
--- trunk/src/libopensrf/osrf_message.c 2009-11-15 18:15:31 UTC (rev 1853)
+++ trunk/src/libopensrf/osrf_message.c 2009-11-15 18:39:44 UTC (rev 1854)
@@ -1,10 +1,18 @@
-#include <opensrf/osrf_message.h>
/**
@file osrf_message.c
@brief Implementation of osrfMessage.
*/
+/* libxml stuff for the config reader */
+#include <libxml/xmlmemory.h>
+#include <libxml/parser.h>
+#include <libxml/xpath.h>
+#include <libxml/xpathInternals.h>
+#include <libxml/tree.h>
+
+#include <opensrf/osrf_message.h>
+
static jsonObject* osrfMessageToJSON( const osrfMessage* msg );
static osrfMessage* deserialize_one_message( const jsonObject* message );
@@ -555,7 +563,7 @@
// Get the message type. If it isn't present, default to CONNECT.
const jsonObject* tmp = jsonObjectGetKeyConst( obj, "type" );
- enum M_TYPE type;
+ enum M_TYPE type = CONNECT;
const char* t = jsonObjectGetString( tmp );
if( t ) {
More information about the opensrf-commits
mailing list