FACT++  1.0
static void read_data ( int  conn_id)
static

Definition at line 114 of file dna.c.

References DNA_CONNECTION::buffer, Dna_conns, DNA_CONNECTION::full_size, OPN_MAGIC, DNA_CONNECTION::read_ast, save_node_task(), DNA_CONNECTION::saw_init, STA_DATA, and TRUE.

Referenced by ast_read_h().

115 {
116  register DNA_CONNECTION *dna_connp = &Dna_conns[conn_id];
117 
118  if( !dna_connp->saw_init &&
119  vtohl(dna_connp->buffer[0]) == (int)OPN_MAGIC)
120  {
121  save_node_task(conn_id, (DNA_NET *) dna_connp->buffer);
122  dna_connp->saw_init = TRUE;
123  }
124  else
125  {
126 /*
127 printf("passing up %d bytes, conn_id %d\n",dna_connp->full_size, conn_id);
128 */
129  dna_connp->read_ast(conn_id, dna_connp->buffer,
130  dna_connp->full_size, STA_DATA);
131  }
132 }
#define STA_DATA
Definition: dim.h:198
#define TRUE
Definition: dim.h:135
#define OPN_MAGIC
Definition: dim.h:208
Definition: dim.h:223
static void save_node_task(int conn_id, DNA_NET *buffer)
Definition: dna.c:930
int saw_init
Definition: dim.h:392
DllExp DIM_NOSHARE DNA_CONNECTION * Dna_conns
Definition: conn_handler.c:31
int full_size
Definition: dim.h:388
int * buffer
Definition: dim.h:384
void(* read_ast)()
Definition: dim.h:382

+ Here is the call graph for this function:

+ Here is the caller graph for this function: