]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update example
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 24 Aug 2009 14:04:59 +0000 (14:04 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 24 Aug 2009 14:04:59 +0000 (14:04 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14617 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/esl/testclient.c

index c9509049ebdfe4fab13fe203a8d2b4b55cdbbe07..9c501f0605f2906757638c4438f926d51fce6ff3 100644 (file)
@@ -11,6 +11,13 @@ int main(void)
 
        esl_send_recv(&handle, "api status\n\n");
 
+       if (handle.last_sr_event && handle.last_sr_event->body) {
+               printf("%s\n", handle.last_sr_event->body);
+       } else {
+               // this is unlikely to happen with api or bgapi (which is hardcoded above) but prefix but may be true for other commands
+               printf("%s\n", handle.last_sr_reply);
+       }
+
        esl_disconnect(&handle);
        
        return 0;