Alexander Chemeris wrote:
On Fri, May 15, 2009 at 11:43 PM, Nobody Nowhere <[email protected]> wrote:
I think i have the same issue .. i'm using the latest sipxtapi from the
main branch on 64 bit linux with my-self patched dns packet parsing (the
one in trunk is not working on 64 bit platforms).
using placecall example (ofcourse modified - coz the one in trunk - does
not use szProxy variable at all)

And of course you should have posted your patches to mailing
list as per LPGL. In general, you must publish all changes if you
deploy your application,

"if i deploy" i'm not deploying anything yet - i decided to not to
publish anything yet because my patches are not "best" quality - those
are "fast" fixes as for now .. i've seen on this mailing list that
someone had a "solid" patch - but i saw it after i fixed it myself

and it's friendly to send patches for problems
you've found. That's the way open-source lives.

i promise that when i'll done with setting everything up - i'll send
full patches

I've seen dns problem on my system - it's 64-bit too, but had no time
to dig into. It would be nice to see you patches.
i can send you only my "fast fix" .. it solves my particular problem -
it's not complex fix ..
i'm attaching it


re: your problem with registration

Please, attach sipXtapi log for that session.

download it from here :
http://przeklej.pl/plik/placecall-tar-gz-0001o70g36jo

would attach but here are limits to 100k per mail

re: recvfrom()
First, please double check your network setup and be sure that
noone uses ports you're trying to listen on, etc.

i'm sure i have 5060 port free
i've even wrote a simple udp server to check it out..

I've seen similar log events before and I recall it was caused by
a stale process preventing new connection to bind to the port


thank you for reply


diff -Naur sipx_nochanges/sipXtackLib/src/resparse/res_parse.c sipX/sipXtackLib/src/resparse/res_parse.c
--- sipx_nochanges/sipXtackLib/src/resparse/res_parse.c	2009-04-27 11:39:06.000000000 +0200
+++ sipX/sipXtackLib/src/resparse/res_parse.c	2009-05-06 17:53:06.000000000 +0200
@@ -37,15 +37,15 @@
 
 u_int _getshort(const u_char *src)
 {
-        u_int dst;
-        NS_GET16(dst, src);
-        return dst;
+        uint16_t dst;
+        memcpy(&dst, src, sizeof(dst));
+        return ntohs(dst);
 }
 u_long _getlong(const u_char *src)
 {
-        u_long dst;
-        NS_GET32(dst, src);
-        return dst;
+        uint32_t dst;
+        memcpy(&dst, src, sizeof(dst));
+        return ntohl(dst);
 }
 #endif
 
@@ -139,10 +139,10 @@
                 free( ptr );
                 return(NULL);
         }
-        ptr->qtype = _getshort(*cpp);
-        *cpp += sizeof(u_short);
-        ptr->qclass = _getshort(*cpp);
-        *cpp += sizeof(u_short);
+	ptr->qtype = _getshort(*cpp);
+        *cpp += 2;
+	ptr->qclass = _getshort(*cpp);
+        *cpp += 2;
 
         return(ptr);
 }

@@ -174,16 +178,16 @@
                 free(ptr);
                 return(NULL);
         }
-        ptr->type = _getshort(*cpp);
-        *cpp += sizeof(u_short);
-        ptr->rclass = _getshort(*cpp);
-        *cpp += sizeof(u_short);
-        ptr->ttl = _getlong(*cpp);
-        *cpp += sizeof(u_long);
 
-        dlen = _getshort(*cpp);
+	ptr->type = _getshort(*cpp);
+        *cpp += 2; // rfc
+	ptr->rclass = _getshort(*cpp);
+        *cpp += 2; // rfc
+	ptr->ttl = _getlong(*cpp);
+        *cpp += 4;
+	dlen = _getshort(*cpp);
         ptr->dlen = dlen;
-        *cpp += sizeof(u_short);
+        *cpp += 2;
 
         rd = &ptr->rdata;
 


_______________________________________________
sipxtapi-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/

Reply via email to