correct,
Assuming the typo in the example was an accident.
(span not my_span_pointer declared on the first line)

zap_span_t *my_span_pointer = NULL;

uint32_t span_id = 1;

zap_status_t result;


result = zap_span_find(span_id, &my_span_pointer);



if it returns ZAP_SUCCESS, that indicates that the desired span exists, is in use and that the pointer will now point to it.
 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_minessale@hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org
pstn:213-799-1400


----- Original Message ----
From: Michael Collins <mcollins@fcnetwork.com>
To: freeswitch-dev@lists.freeswitch.org
Sent: Thursday, March 6, 2008 8:27:35 PM
Subject: [Freeswitch-dev] OZ Question: zap_span_find()

Does this function do what I think it does?  If I give it a span number to look for, it returns ZAP_SUCCESS if it finds the span and it sets the value of the pointer variable that I call it with?

 

Example, what happens if I do this, assuming span 1 is a real span?

 

zap_span_t *span = NULL;

uint32_t span_id = 1;

result = zap_span_find(span_id, &my_span_pointer);

 

Does *my_span_pointer now point to span 1?  Any caveats that I should be aware of?

 

Thanks,

MC



-----Inline Attachment Follows-----

_______________________________________________
Freeswitch-dev mailing list
Freeswitch-dev@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org



Looking for last minute shopping deals? Find them fast with Yahoo! Search.