[Freeswitch-dev] error with referencing channel->direction
Mathieu Rene
mrene_lists at avgs.ca
Wed Dec 23 06:22:54 PST 2009
Hi,
You may not dereference switch_channel_t or switch_session_t. They are
opaque structure to force people to use wrapper functions in
switch_channel.h and in switch_core_session.h.
The function you are looking for is:
SWITCH_DECLARE(switch_call_direction_t)
switch_channel_direction(switch_channel_t *channel);
Cheers,
Mathieu Rene
Avant-Garde Solutions Inc
Office: + 1 (514) 664-1044 x100
Cell: +1 (514) 664-1044 x200
mrene at avgs.ca
On 23-Dec-09, at 7:56 AM, Juan Backson wrote:
> Hi,
>
> The following lines give me some strange error:
>
>
> switch_channel_t *channel =
> switch_core_session_get_channel(session);
>
>
>
>
>
> if (channel->direction==SWITCH_CALL_DIRECTION_OUTBOUND) {
>
>
> error: dereferencing pointer to incomplete type
>
> _______________________________________________
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
More information about the FreeSWITCH-dev
mailing list