[Asterisk-Users] C Manager Interface Client

Tzafrir Cohen tzafrir at cohens.org.il
Sat Oct 1 12:44:14 MST 2005


On Sat, Oct 01, 2005 at 12:17:38PM -0500, Tressler, Joshua A wrote:
> When we pull up a telnet session beside this code, the telnet sessions
> shows everything in blocks together. We insert lines between socket
> reads, therefore we see
> 
> Event: *****
> 
> Privilege: ******
> 
> Instead of 
> 
> Event: *****
> Privilege: ******
> 
> Below is the code that we have. We are getting ready to run a sniffer
> and see if/why asterisk is doing the writes separately instead of in one
> chunk.
> 
> Joshua
> 
> =======================

What is that code you attached? Certainly not something that compiles.

Not even a main() in there.

Try adding:

#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <unistd.h>
#include <string.h>
#include <netinet/in.h>
#include <netdb.h>

And then put the code in main() or otherwise in functions. Next step is
to make it pass cc -Wall .

After I did that, your code worked fine here.

-- 
Tzafrir Cohen         | tzafrir at jbr.cohens.org.il | VIM is
http://tzafrir.org.il |                           | a Mutt's  
tzafrir at cohens.org.il |                           |  best
ICQ# 16849755         |                           | friend



More information about the asterisk-users mailing list