LCR - too few dots/colons

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

LCR - too few dots/colons

Annus Fictus
Hello,

any explication about these messages?

DEBUG: lcr [../../core/resolve.h:258]: str2ip(): str2ip: ERROR: too few
dots in [253719602]
DEBUG: lcr [../../core/resolve.h:355]: str2ip6(): str2ip6: ERROR: too
few colons in [253719602]

Thnak you

Regards



_______________________________________________
Kamailio (SER) - Users Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

LCR - too few dots/colons

Juha Heinanen
Annus Fictus writes:

> any explication about these messages?
>
> DEBUG: lcr [../../core/resolve.h:258]: str2ip(): str2ip: ERROR: too few
> dots in [253719602]
> DEBUG: lcr [../../core/resolve.h:355]: str2ip6(): str2ip6: ERROR: too
> few colons in [253719602]

when do they appear?  during lcr reload, load_gws(), ....?

-- juha

_______________________________________________
Kamailio (SER) - Users Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: LCR - too few dots/colons

Juha Heinanen
Annus Fictus writes:

> on ip_addr field the value is a normal IPv4 address like 1.2.3.4
>
> The gw_uri_avp befor call next_gws is:
>
> '1|sip:|0|||253719602||5060||;transport=udp|0'

That looks fine and these are just debug messages:

> DEBUG: lcr [../../core/resolve.h:258]: str2ip(): str2ip: ERROR: too few
> dots in [253719602]
> DEBUG: lcr [../../core/resolve.h:355]: str2ip6(): str2ip6: ERROR: too
> few colons in [253719602]

The code first tries if address field (in this case 253719602) contains
an ip 4 or 6 address string and, if not, takes int from the field and
places it into addr struct:

    if (s.len > 0) {
        if ((ip = str2ip(&s)) != NULL)
            *addr = *ip;
        else if ((ip = str2ip6(&s)) != NULL)
            *addr = *ip;
        else {
            str2int(&s, &u);
            addr->af = AF_INET;
            addr->len = 4;
            addr->u.addr32[0] = u;
        }
    } else {
        addr->af = 0;
    }

-- Juha

_______________________________________________
Kamailio (SER) - Users Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Loading...