Problems with peer example

12 views
Skip to first unread message

Narayan, Jyothirmai (SCR US EXT)

unread,
Jun 1, 2011, 12:15:16 PM6/1/11
to ws4d-gso...@googlegroups.com
Hi,
 
When I tried to build the peer example I got the following errors:
 
/home/jnarayan/ws4d-gsoap-projects/ac_peer/src/discovery_helper.c:46: error: variable ‘discovery_hooks’ has initializer but incomplete type
/home/jnarayan/ws4d-gsoap-projects/ac_peer/src/discovery_helper.c:46: warning: excess elements in struct initializer
/home/jnarayan/ws4d-gsoap-projects/ac_peer/src/discovery_helper.c:46: warning: (near initialization for ‘discovery_hooks’)
/home/jnarayan/ws4d-gsoap-projects/ac_peer/src/discovery_helper.c:46: warning: excess elements in struct initializer
/home/jnarayan/ws4d-gsoap-projects/ac_peer/src/discovery_helper.c:46: warning: (near initialization for ‘discovery_hooks’)
/home/jnarayan/ws4d-gsoap-projects/ac_peer/src/discovery_helper.c: In function ‘discovery_helper_start’:
/home/jnarayan/ws4d-gsoap-projects/ac_peer/src/discovery_helper.c:91: warning: passing argument 3 of ‘dpws_init_implicit_discovery’ from incompatible pointer type
/home/jnarayan/ws4d-gsoap-0.8.src/ws4d-gsoap-install/include/ws4d-gSOAP/stddpws.h:674: note: expected ‘struct dpws_discovery_hooks *’ but argument is of type ‘struct wsd_dis_hooks_t *’
make[2]: *** [src/CMakeFiles/acc_device.dir/discovery_helper.o] Error 1
make[1]: *** [src/CMakeFiles/acc_device.dir/all] Error 2
make: *** [all] Error 2
 
 
In order to build it I made the following change in discovery_helper.c
 
I replaced
 
struct  wsd_dis_hooks_t   discovery_hooks = {new_device, invalidate_device);
 
by
 
struct   dpws_discovery_hooks   discovery_hooks = {new_device, invalidate_device);
 
I haven’t looked at it in detail and I’m not sure if this is correct.  However the example does not build as given.
 
When I execute the example with the above change, I get the following error:
 
(/home/jnarayan/ws4d-gsoap-0.8.src/src/libdpws/gsoap/dpws.c:545) assertion failed: (dpws->dis_mca && !dis_mca)
Could not init implicit discovery
 
Does anyone have information about this?  It appears that some changes have to be made to handle multicast discovery messages.
 
Regards,
 
Jyothi Narayan
 
Siemens Corporate Research
 
 
 

Elmar Zeeb

unread,
Jun 7, 2011, 12:54:47 PM6/7/11
to ws4d-gso...@googlegroups.com
Hi Jyothirmai,

sorry for my late response.

I fixed the peer example in the release-0.8.x branch:
http://trac.e-technik.uni-rostock.de/projects/ws4d-gsoap/changeset/451

It only shows a device and that it can do discovery at the same time. So
it is more like a proof of concept than a good example. In the trunk
there is a better example with some more "infra structure" (service and
device trackers) that is not included in the release-0.8.x branch.

Be aware that the callbacks in the acc_device are blocking the message
processing loop. So you should built a mechanism that defers these
events as i did with the service and device trackers.

Regards,
Elmar

Am 01.06.2011 18:15, schrieb Narayan, Jyothirmai (SCR US EXT):
> Hi,
> When I tried to build the peer example I got the following errors:
> /home/jnarayan/ws4d-gsoap-projects/ac_peer/src/discovery_helper.c:46:

> error: variable �discovery_hooks� has initializer but incomplete type


> /home/jnarayan/ws4d-gsoap-projects/ac_peer/src/discovery_helper.c:46:
> warning: excess elements in struct initializer
> /home/jnarayan/ws4d-gsoap-projects/ac_peer/src/discovery_helper.c:46:

> warning: (near initialization for �discovery_hooks�)


> /home/jnarayan/ws4d-gsoap-projects/ac_peer/src/discovery_helper.c:46:
> warning: excess elements in struct initializer
> /home/jnarayan/ws4d-gsoap-projects/ac_peer/src/discovery_helper.c:46:

> warning: (near initialization for �discovery_hooks�)
> /home/jnarayan/ws4d-gsoap-projects/ac_peer/src/discovery_helper.c: In
> function �discovery_helper_start�:
> /home/jnarayan/ws4d-gsoap-projects/ac_peer/src/discovery_helper.c:91:
> warning: passing argument 3 of �dpws_init_implicit_discovery� from


> incompatible pointer type
> /home/jnarayan/ws4d-gsoap-0.8.src/ws4d-gsoap-install/include/ws4d-gSOAP/stddpws.h:674:

> note: expected �struct dpws_discovery_hooks *� but argument is of type
> �struct wsd_dis_hooks_t *�


> make[2]: *** [src/CMakeFiles/acc_device.dir/discovery_helper.o] Error 1
> make[1]: *** [src/CMakeFiles/acc_device.dir/all] Error 2
> make: *** [all] Error 2
> In order to build it I made the following change in discovery_helper.c
> I replaced
> struct wsd_dis_hooks_t discovery_hooks = {new_device, invalidate_device);
> by
> struct dpws_discovery_hooks discovery_hooks = {new_device,
> invalidate_device);

> I haven�t looked at it in detail and I�m not sure if this is correct.


> However the example does not build as given.
> When I execute the example with the above change, I get the following error:
> (/home/jnarayan/ws4d-gsoap-0.8.src/src/libdpws/gsoap/dpws.c:545)
> assertion failed: (dpws->dis_mca && !dis_mca)
> Could not init implicit discovery
> Does anyone have information about this? It appears that some changes
> have to be made to handle multicast discovery messages.
> Regards,

> /*Jyothi Narayan*/
> *Siemens Corporate Research*
> *(609)734-6500 Ext 2348*
> *jyothirmai....@siemens.com*
>
> --
> You received this message because you are subscribed to the Google
> Groups "WS4D-gSOAP Users" group.
> To post to this group, send email to ws4d-gso...@googlegroups.com.
> To unsubscribe from this group, send email to
> ws4d-gsoap-use...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/ws4d-gsoap-users?hl=en.


--

*******************************************************************************
Dipl.-Inf. Elmar Zeeb
Universit�t Rostock, Fakult�t f. Informatik und Elektrotechnik
Institut f. Angewandte Mikroelektronik und Datentechnik
University of Rostock, Faculty of CS and EE
Institute of Applied Microelectronics and Computer Engineering,
18051 Rostock
Deutschland/Germany
Tel. : ++49 (0)381 498 - 7262
Fax : ++49 (0)381 498 - 7252
Email: elmar...@uni-rostock.de
www : http://www.imd.uni-rostock.de/, http://www.ws4d.org/
*******************************************************************************

Reply all
Reply to author
Forward
0 new messages