[PATCH 1/3] smpp_smsc: Print errno and close socket if read returns -1

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Daniel Willmann dwillmann at sysmocom.de
Mon Jan 20 18:47:23 UTC 2014


On Fri, 2014-01-17 at 18:23, Holger Hans Peter Freyther wrote:
> On Fri, Jan 17, 2014 at 05:26:26PM +0100, Daniel Willmann wrote:
> 
> For reference. you should make the errno check in both cases or just
> simplify the reading part and move the error handling to a macro.

Good catch, thanks. I made the checks into a macro which should
eventually end up in libosmocore so it's usable by other projects as
well.

I found another issue as well which I rolled into my last patch.
msgb_alloc takes a uint16_t as size so the check was still wrong.

I rebased and pushed the new patches to daniel/smpp-fixes


Regards,
Daniel

-- 
- Daniel Willmann <dwillmann at sysmocom.de>       http://www.sysmocom.de/
=======================================================================
* sysmocom - systems for mobile communications GmbH
* Schivelbeiner Str. 5
* 10439 Berlin, Germany
* Sitz / Registered office: Berlin, HRB 134158 B
* Geschaeftsfuehrer / Managing Directors: Holger Freyther, Harald Welte




More information about the OpenBSC mailing list