-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi,
I use the following code to initialize an OBEX server. size_t size = sizeof(struct sockaddr_in); struct sockaddr_in *addr = smlTryMalloc0(size, error); if (!addr) goto error; addr->sin_family = PF_INET; addr->sin_port = htons(env->port); addr->sin_addr.s_addr = INADDR_ANY; /* register server */ if (GET_OBEX_RESULT(TcpOBEX_ServerRegister(env->handle, (struct sockaddr *) addr, size)) < 0) ... OBEX_Init is called earlier with OBEX_TRANS_INET. My problem is that Valgrind reports that there is a problem with bind. So my question is, what must be changed in my code to use libopenobex in the right way? I have no idea why libopenobex do IPv6 stuff with my IPv4 address. The code itself works. Valgrind only reports a read of unitialised bytes. Best regards Michael P.S.Valgrind reports <b>UMR</b> ==17428== Syscall param socketcall.bind(my_addr..sin6_scope_id) points to uninitialised byte(s) ==17428== at 0x4000832: (within /lib/ld-2.9.so) ==17428== by 0x4413277: (within /usr/lib/libopenobex.so.1.5.0) ==17428== by 0x440FF0B: TcpOBEX_ServerRegister (in /usr/lib/libopenobex.so.1.5.0) ==17428== by 0x40A83BA: smlTransportObexServerInit (in /tmp/build/libsyncml/libsyncml/libsyncml.so.3.0.0) ==17428== by 0x405B3DA: smlTransportInitialize (in /tmp/build/libsyncml/libsyncml/libsyncml.so.3.0.0) ==17428== by 0x4062390: sml_data_sync_client_init (in /tmp/build/libsyncml/libsyncml/libsyncml.so.3.0.0) ==17428== by 0x406A9A3: sml_data_sync_initialize (in /tmp/build/libsyncml/libsyncml/libsyncml.so.3.0.0) ==17428== by 0x804E784: run_testbed (in /tmp/build/libsyncml/tests/ds_api) ==17428== by 0x804EE66: ds_api_single_client_single_image_jpeg (in /tmp/build/libsyncml/tests/ds_api) ==17428== by 0x8052C4C: srunner_run_all (in /tmp/build/libsyncml/tests/ds_api) ==17428== by 0x8050C92: sml_testsuite (in /tmp/build/libsyncml/tests/ds_api) ==17428== by 0x804FDDE: main (in /tmp/build/libsyncml/tests/ds_api) ==17428== Address 0x47bb098 is 88 bytes inside a block of size 236 alloc'd ==17428== at 0x402601E: malloc (vg_replace_malloc.c:207) ==17428== by 0x44109D3: OBEX_Init (in /usr/lib/libopenobex.so.1.5.0) ==17428== by 0x40A82C8: smlTransportObexServerInit (in /tmp/build/libsyncml/libsyncml/libsyncml.so.3.0.0) ==17428== by 0x405B3DA: smlTransportInitialize (in /tmp/build/libsyncml/libsyncml/libsyncml.so.3.0.0) ==17428== by 0x4062390: sml_data_sync_client_init (in /tmp/build/libsyncml/libsyncml/libsyncml.so.3.0.0) ==17428== by 0x406A9A3: sml_data_sync_initialize (in /tmp/build/libsyncml/libsyncml/libsyncml.so.3.0.0) ==17428== by 0x804E784: run_testbed (in /tmp/build/libsyncml/tests/ds_api) ==17428== by 0x804EE66: ds_api_single_client_single_image_jpeg (in /tmp/build/libsyncml/tests/ds_api) ==17428== by 0x8052C4C: srunner_run_all (in /tmp/build/libsyncml/tests/ds_api) ==17428== by 0x8050C92: sml_testsuite (in /tmp/build/libsyncml/tests/ds_api) ==17428== by 0x804FDDE: main (in /tmp/build/libsyncml/tests/ds_api) - -- ___________________________________________________________________ Michael Bell Humboldt-Universitaet zu Berlin Tel.: +49 (0)30-2093 2482 ZE Computer- und Medienservice Fax: +49 (0)30-2093 2704 Unter den Linden 6 michael.b...@cms.hu-berlin.de D-10099 Berlin ___________________________________________________________________ PGP Fingerprint: 09E4 3D29 4156 2774 0F2C C643 D8BD 1918 2030 5AAB -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrF90gACgkQ2L0ZGCAwWqtwgwCg2Ket7bpFNYTy0FwQbW7Y5ZN+ 8L0AnjR1del9ZSo8XZrCGIk8WsXizQIs =SGgG -----END PGP SIGNATURE----- ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Openobex-users mailing list Openobex-users@lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/openobex-users