Hello,
I experienced another alignment trap with a Blackberry 7130g but at another place in the code. The patch joined worked for me. It's basically the same kind of problem as for the previous alignment trap bug.

Nicolas CARRIER


diff -ruN barry-0.17.1.orig//src/m_desktop.cc barry-0.17.1.work//src/m_desktop.cc
--- barry-0.17.1.orig//src/m_desktop.cc	2011-03-01 23:49:16.000000000 +0100
+++ barry-0.17.1.work//src/m_desktop.cc	2011-05-02 17:17:31.100791707 +0200
@@ -62,7 +62,10 @@
 void Desktop::LoadCommandTable()
 {
 	char rawCommand[] = { 6, 0, 0x0a, 0, 0x40, 0, 0, 1, 0, 0 };
-	*((uint16_t*) rawCommand) = htobs(m_socket->GetSocket());
+	uint16_t sock = htobs(m_socket->GetSocket());
+
+	rawCommand[0] = sock & 0xFF;
+	rawCommand[1] = (sock & 0xFF00) >> 8;
 
 	Data command(rawCommand, sizeof(rawCommand));

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Barry-devel mailing list
Barry-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/barry-devel

Reply via email to