[Pkg-samba-maint] r3065 - in trunk/openchange: . debian libmapi++ libmapi++/examples

jelmer at alioth.debian.org jelmer at alioth.debian.org
Sat Sep 26 13:57:38 UTC 2009


Author: jelmer
Date: 2009-09-26 13:57:36 +0000 (Sat, 26 Sep 2009)
New Revision: 3065

Modified:
   trunk/openchange/Makefile
   trunk/openchange/debian/changelog
   trunk/openchange/libmapi++/examples/messages.cpp
   trunk/openchange/libmapi++/mapi_exception.h
Log:
merge new upstream

Modified: trunk/openchange/debian/changelog
===================================================================
--- trunk/openchange/debian/changelog	2009-09-26 13:57:28 UTC (rev 3064)
+++ trunk/openchange/debian/changelog	2009-09-26 13:57:36 UTC (rev 3065)
@@ -1,4 +1,4 @@
-openchange (1:0.8.2+svn1522-1) unstable; urgency=low
+openchange (1:0.8.2+svn1524-1) unstable; urgency=low
 
   * New upstream snapshot.
   * Upload to unstable.

Modified: trunk/openchange/libmapi++/examples/messages.cpp
===================================================================
--- trunk/openchange/libmapi++/examples/messages.cpp	2009-09-26 13:57:28 UTC (rev 3064)
+++ trunk/openchange/libmapi++/examples/messages.cpp	2009-09-26 13:57:36 UTC (rev 3065)
@@ -52,9 +52,13 @@
 			msg_props << PR_DISPLAY_TO << PR_CONVERSATION_TOPIC;
 			msg_props.fetch();
 			// Display those properties
-			std::cout << "|-----> " << (const char*)msg_props[PR_DISPLAY_TO]
-				  << "\t\t| " << (const char*)msg_props[PR_CONVERSATION_TOPIC]
-				  << std::endl;
+			if (msg_props[PR_DISPLAY_TO] != 0) {
+				std::cout << "|-----> " << (const char*)msg_props[PR_DISPLAY_TO];
+				if(msg_props[PR_CONVERSATION_TOPIC] != 0) {
+					std::cout << "\t\t| " << (const char*)msg_props[PR_CONVERSATION_TOPIC];
+				}
+				std::cout << std::endl;
+			}
         	}
         }
         catch (libmapipp::mapi_exception e) // Catch any MAPI exceptions

Modified: trunk/openchange/libmapi++/mapi_exception.h
===================================================================
--- trunk/openchange/libmapi++/mapi_exception.h	2009-09-26 13:57:28 UTC (rev 3064)
+++ trunk/openchange/libmapi++/mapi_exception.h	2009-09-26 13:57:36 UTC (rev 3065)
@@ -26,6 +26,8 @@
 #include <iostream>
 #include <string>
 
+#include <cstring>
+
 #include <libmapi++/clibmapi.h>
 
 #define STATUS_TABLE_INSERT(status) sm_status_map.insert(status_map::value_type(status, #status));
@@ -48,7 +50,7 @@
 			ret_string += ": ";
 			ret_string += (iter != sm_status_map.end()) ? iter->second : "Unknown MAPISTATUS value";
 
-			return ret_string.c_str();
+			return const_cast<const char*>(::strdup(ret_string.c_str()));
 		}
 		enum MAPISTATUS get_status() const { return m_status; }
 




More information about the Pkg-samba-maint mailing list