Difference for socket/loop.c from version 1.44 to 1.45


version 1.44 version 1.45
Line 1
 
Line 1
   
 /*  /*
  * static char *rcsid_loop_c =   * static char *rcsid_loop_c =
  *    "$Id: loop.c,v 1.44 2006/05/18 05:27:44 mwedel Exp $";   *    "$Id: loop.c,v 1.45 2006/05/21 10:35:11 akirschbaum Exp $";
  */   */
   
 /*  /*
Line 185
 
Line 185
      * or no more characters to read.       * or no more characters to read.
      */       */
     do {      do {
  if (ns->inbuf.len >= MAXSOCKBUF-1) {   if (ns->inbuf.len >= MAXSOCKRECVBUF-1) {
      ns->status = Ns_Dead;       ns->status = Ns_Dead;
      LOG(llevDebug, "Old input socket sent too much data without newline\n");       LOG(llevDebug, "Old input socket sent too much data without newline\n");
      return;       return;
Line 341
 
Line 341
      handle_oldsocket(ns);       handle_oldsocket(ns);
      return;       return;
  }   }
  i=SockList_ReadPacket(ns->fd, &ns->inbuf, MAXSOCKBUF-1);   i=SockList_ReadPacket(ns->fd, &ns->inbuf, MAXSOCKRECVBUF-1);
  /* Special hack - let the user switch to old mode if in the Ns_Add   /* Special hack - let the user switch to old mode if in the Ns_Add
  * phase.  Don't demand they add in the special length bytes   * phase.  Don't demand they add in the special length bytes
  */   */
Line 366
 
Line 366
  /* Still dont have a full packet */   /* Still dont have a full packet */
  if (i==0) return;   if (i==0) return;
   
    ns->inbuf.buf[ns->inbuf.len]='\0';  /* Terminate buffer - useful for string data */
   
  /* First, break out beginning word.  There are at least   /* First, break out beginning word.  There are at least
  * a few commands that do not have any paremeters.  If   * a few commands that do not have any paremeters.  If
  * we get such a command, don't worry about trying   * we get such a command, don't worry about trying
Line 379
 
Line 381
  }   }
  else len=0;   else len=0;
   
  ns->inbuf.buf[ns->inbuf.len]='\0';  /* Terminate buffer - useful for string data */  
  for (i=0; client_commands[i].cmdname !=NULL; i++) {   for (i=0; client_commands[i].cmdname !=NULL; i++) {
      if (strcmp((char*)ns->inbuf.buf+2,client_commands[i].cmdname)==0) {       if (strcmp((char*)ns->inbuf.buf+2,client_commands[i].cmdname)==0) {
  client_commands[i].cmdproc((char*)data,len,ns);   client_commands[i].cmdproc((char*)data,len,ns);


Legend:
line(s) removed in v.1.44 
line(s) changed
 line(s) added in v.1.45

File made using version 1.98 of cvs2html by leaf at 2011-07-21 19:35