bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Serial patch for commoncpp-1.7.3 framework


From: Andrey Mandychev
Subject: Serial patch for commoncpp-1.7.3 framework
Date: Mon, 01 Feb 2010 18:59:20 +0300
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.7) Gecko/20100120 Fedora/3.0.1-1.fc11 Thunderbird/3.0.1

Dear,

Two months ago I faced with commoncpp framework and decided to include it in my project. I was really enjoy working with commoncpp. Threads, unix sockets and serial port were used. It works fine. But I have one issue connecting with ost::SerialService class. Below there is a description of it.

I created AppSerialPort class derived from ost::SerialPort. The new class is self-deleting class like ChatterSession from tcpservice demo. It deletes itself when serial port has disconnected. But such implementation leads to segmentation fault. Because ost::SerialService attempts to get access to deleted object. To solve the issue I've made a few changes in the ost::SerialService class which are similar to ost::SocketService class.

I'm sending you the patch. Please try it and see the difference. For more information I have attached short demo. You can launch it before and after patch. Hope it helps to improve the code.

--
Best Regards,
Andrey Mandychev.

Attachment: serialpatch.tgz
Description: application/compressed-tar


reply via email to

[Prev in Thread] Current Thread [Next in Thread]