[python] Problem selecting the transport bound address

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

 



On Wed, Aug 13, 2008 at 8:58 AM, Sa?l Ibarra <saghul at gmail.com> wrote:

> Hi!
>
> I'm having a little trouble selecting the bound address when creating
> the transport object. The port selection is OK, but when I try to set
> the bound address I get this error:
>
> python: ../src/pj/sock_common.c:297: pj_sockaddr_get_addr: Assertion
> `a->addr.sa_family == PJ_AF_INET || a->addr.sa_family == PJ_AF_INET6'
> failed.
>
> I'm using the following code:
>
> def bind(self, bindaddr="0.0.0.0", bindport=5060):
>        try:
>            t = pj.TransportConfig()
>            t.bound_addr = bindaddr
>            t.port = bindport
>            self.transport = self.lib.create_transport(pj.TransportType.UDP,
> t)
>        except pj.Error, e:
>            print "Error creating transport ", e
>
> I'm getting the error when I do
>
> bind("10.10.0.207", 5080)
>
> because if I do
>
> bind(bindport=5080)
>
> everything is OK. I think this is a really stupid mistake, but I
> haven't found it :( What am I doing wrong? Thanks in advance.
>
>
Actually there was a minor bug in pjlib, I've just fixed that in the latest
SVN. It should work now.

Thanks
 Benny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080813/cedb9530/attachment.html 


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux