static void process_data() { gs_uint32_t nsz; FTAID rfta_id; gs_uint32_t rsize; gs_int32_t code; gs_int8_t rbuf[2*MAXTUPLESZ]; gs_int8_t topb[1024]; if (verbose!=0) gslog(LOG_INFO,"Getting Data"); sprintf(&topb[0],"GDAT\nVERSION:%u\nSCHEMALENGTH:%u\n", parserversion,(unsigned int)strlen(fs.asciischema)+1); gs_write(&topb[0],strlen(topb)); gs_write(fs.asciischema,strlen(fs.asciischema)+1); while((code=ftaapp_get_tuple(&rfta_id,&rsize,rbuf,2*MAXTUPLESZ,0))>=0) { nsz=htonl(rsize); if ((withtrace==0)&&(code==2)) continue; if (verbose) { if (ftaschema_is_eof_tuple(fs.schema, rbuf)) { /* initiate shutdown or something of that nature */ gslog(LOG_INFO,"gsexit::All data proccessed\n"); } } gs_write((gs_sp_t)&nsz,sizeof(gs_uint32_t)); gs_write(rbuf,rsize); } }
/* * Remove a G-Line from the active store. */ void glinestore_remove(struct userBan *ban) { if (journal >= 0) gs_write(journal, '-', ban); if (++journalcount > GLINE_STORE_COMPACT_THRESH) glinestore_compact(); }