Switch to side-by-side view

--- a/libupnpp/control/description.cxx
+++ b/libupnpp/control/description.cxx
@@ -117,7 +117,7 @@
 };
 
 UPnPDeviceDesc::UPnPDeviceDesc(const string& url, const string& description)
-    : ok(false)
+    : XMLText(description)
 {
     //cerr << "UPnPDeviceDesc::UPnPDeviceDesc: url: " << url << endl;
     //cerr << " description " << endl << description << endl;
@@ -143,8 +143,6 @@
 }
 
 
-
-
 // XML parser for the service description document (SCPDURL)
 class ServiceDescriptionParser : public inputRefXMLParser {
 public:
@@ -222,9 +220,9 @@
         case 'd':
             if (!strcmp(name, "direction")) {
                 if (!lastelt.data.compare("in")) {
+                    m_targ.todevice = true;
+                } else {
                     m_targ.todevice = false;
-                } else {
-                    m_targ.todevice = true;
                 }
             } else if (!strcmp(name, "dataType")) {
                 m_tvar.dataType = lastelt.data;
@@ -289,7 +287,7 @@
 };
 
 bool UPnPServiceDesc::fetchAndParseDesc(const string& urlbase,
-                                        Parsed& parsed) const
+                                        Parsed& parsed, string *xmltxt) const
 {
     char *buf = 0;
     char contentType[LINE_SIZE];
@@ -300,6 +298,9 @@
                url << " : " << LibUPnP::errAsString("", code) << endl);
         return false;
     }
+    if (xmltxt) {
+        *xmltxt = buf;
+    }
     string sdesc(buf);
     free(buf);
     ServiceDescriptionParser parser(parsed, sdesc);