osmo-sip-connector.git branch master updated. 37c2254f5dd0f29bf1073ee3d983eb270f4f8429

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

gitosis at osmocom.org gitosis at osmocom.org
Wed Mar 8 10:27:38 UTC 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MNCC <-> SIP bridge".

The branch, master has been updated
       via  37c2254f5dd0f29bf1073ee3d983eb270f4f8429 (commit)
      from  49880ddf740a7af47a1247dbff9acb34087b6afc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cgit.osmocom.org/osmo-sip-connector/commit/?id=37c2254f5dd0f29bf1073ee3d983eb270f4f8429

commit 37c2254f5dd0f29bf1073ee3d983eb270f4f8429
Author: Holger Hans Peter Freyther <holger at moiji-mobile.com>
Date:   Tue Mar 7 07:59:00 2017 +0100

    evpoll: Add workaround for usage of IP_RECVERR in sofia-sip
    
    We are using glib to benefit from the sofia-sip-glib eventloop
    integration and set a poll func (evpoll) to be called by glib
    to integrate with the rest of libosmocore.
    
    Sofia-sip will use IP_RECVERR to enable error reporting on the
    socket and then sets SU_WAIT_ERR (mapped to POLLERR if not using
    kqueue) in the internal events flag of the socket. This will
    be registered with a su_wait (mapped to struct pollfd) and then
    glib will be called with g_source_add_poll. At this point the
    the fd->events will still have the POLLERR bit set.
    
    Before glib is calling its internal poll routine or our one
    it will copy all registered fd into an array and mask the
    events flags:
    
          /* In direct contradiction to the Unix98 spec, IRIX runs into
           * difficulty if you pass in POLLERR, POLLHUP or POLLNVAL
           * flags in the events field of the pollfd while it should
           * just ignoring them. So we mask them out here.
           */
          events = pollrec->fd->events & ~(G_IO_ERR|G_IO_HUP|G_IO_NVAL);
    
    This leads to the POLLERR flag never been set in the revents
    of the struct poll_fd and as such we never put them in the
    exceptionset and as such:
    
            static int tport_base_wakeup(tport_t *self, int events)
            {
            int error = 0;
    
            if (events & SU_WAIT_ERR)
                    error = tport_error_event(self);
    
    tport_base_wakeup will never call tport_error_event. And the error
    will be stuck in the socket data forever and recvmsg will return
    a zero length packet. And this will repeat until the end of time.
    
    As a first hack I mapped SU_WAIT_ERR to POLLPRI but when using
    select the Linux kernel will not put the socket error into the
    except queue unless the sockopt SOCK_SELECT_ERR_QUEUE is used.
    
    One option is to use poll and then map the select requirements
    to poll. Right now I just signal POLLERR as well to trigger
    tport_error_event. This will result in extra syscalls for each
    received UDP message right now.
    
    Change-Id: I5bec4a7b70f421ab670e649e5bc1ea6faf59707c

-----------------------------------------------------------------------

Summary of changes:
 src/evpoll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
MNCC <-> SIP bridge



More information about the osmocom-commitlog mailing list