Change in libosmo-sccp[master]: Introduce osmo_ss7_asp_rx_unknown() for handling unknown PPID/StreamID

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/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Wed Jun 6 09:37:26 UTC 2018


Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/9439 )

Change subject: Introduce osmo_ss7_asp_rx_unknown() for handling unknown PPID/StreamID
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/9439/1/src/osmo_ss7.c
File src/osmo_ss7.c:

https://gerrit.osmocom.org/#/c/9439/1/src/osmo_ss7.c@1923
PS1, Line 1923: __attribute__((weak))
> the introduction of a weak symbol  for overloading is of course a bit controversial. […]
To be honest, it's the first time I see this, I was not aware it existed.

According to wikipedia https://en.wikipedia.org/wiki/Weak_symbol:
"Weak symbols are not mentioned by the C or C++ language standards; as such, inserting them into code is not very portable. Even if two platforms support the same or similar syntax for marking symbols as weak, the semantics may differ in subtle points, e.g. whether weak symbols during dynamic linking at runtime lose their semantics or not."

For instance, it seems the syntax and behavior when compiling with MSVC++ (eg. to run in MS Windows) is different from that of GCC.

I think the best (more portable, more clear) would be to have a function callback pointer and have an API to set it. Set it by default to osmo_ss7_asp_rx_unknown. Maybe rename it to osmo_ss7_asp_rx_unknown_default? (and make it static).



-- 
To view, visit https://gerrit.osmocom.org/9439
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8616f914192000df0ec6547ff4ada80e0f9042a2
Gerrit-Change-Number: 9439
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-CC: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Comment-Date: Wed, 06 Jun 2018 09:37:26 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180606/7ba36634/attachment.htm>


More information about the gerrit-log mailing list