Difference for socket/info.c from version 1.17 to 1.18


version 1.17 version 1.18
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_sock_info_c =   * static char *rcsid_sock_info_c =
  *   "$Id: info.c,v 1.17 2004/01/18 10:36:10 ryo_saeba Exp $";   *   "$Id: info.c,v 1.18 2004/06/22 06:28:08 mwedel Exp $";
  */   */
   
 /*  /*
Line 53
 
Line 53
     char buf[HUGE_BUF];      char buf[HUGE_BUF];
   
     if (ns->status == Ns_Old) {      if (ns->status == Ns_Old) {
  sprintf(buf,"%s\n", str);   snprintf(buf,HUGE_BUF,"%s\n", str);
     } else {      } else {
  sprintf(buf,"drawinfo %d %s", color, str);   snprintf(buf,HUGE_BUF, "drawinfo %d %s", color, str);
     }      }
 /*    LOG(llevDebug,"sending %s to socket, len=%d", buf, strlen(buf));*/  /*    LOG(llevDebug,"sending %s to socket, len=%d", buf, strlen(buf));*/
     Write_String_To_Socket(ns, buf, strlen(buf));      Write_String_To_Socket(ns, buf, strlen(buf));
Line 100
 
Line 100
     char tbuf[MAX_BUF];      char tbuf[MAX_BUF];
   
     if (outputs->buf==NULL) return;      if (outputs->buf==NULL) return;
     sprintf(tbuf,"%d times %s", outputs->count, outputs->buf);      snprintf(tbuf,MAX_BUF, "%d times %s", outputs->count, outputs->buf);
     print_message(NDI_BLACK, pl, tbuf);      print_message(NDI_BLACK, pl, tbuf);
     free_string(outputs->buf);      free_string(outputs->buf);
     outputs->buf=NULL;      outputs->buf=NULL;
Line 230
 
Line 230
     va_list ap;      va_list ap;
     va_start(ap, format);      va_start(ap, format);
   
     vsprintf(buf, format, ap);      vsnprintf(buf, HUGE_BUF, format, ap);
   
     va_end(ap);      va_end(ap);
   
Line 523
 
Line 523
     }      }
   
     sl.buf=malloc(MAXSOCKBUF);      sl.buf=malloc(MAXSOCKBUF);
     sprintf((char*)sl.buf,"magicmap %d %d %d %d ", (xmax-xmin+1), (ymax-ymin+1),      snprintf((char*)sl.buf, MAXSOCKBUF, "magicmap %d %d %d %d ", (xmax-xmin+1), (ymax-ymin+1),
      MAGIC_MAP_HALF - xmin, MAGIC_MAP_HALF - ymin);       MAGIC_MAP_HALF - xmin, MAGIC_MAP_HALF - ymin);
     sl.len=strlen((char*)sl.buf);      sl.len=strlen((char*)sl.buf);
          
Line 552
 
Line 552
     char buf[MAX_BUF];      char buf[MAX_BUF];
   
     if (With!=NULL) {      if (With!=NULL) {
  sprintf(buf,"%s\t%s\t%d\t%s\t%d\n",Who,What,WhatType,With,WithType);   snprintf(buf, MAX_BUF, "%s\t%s\t%d\t%s\t%d\n",Who,What,WhatType,With,WithType);
     }      }
     else {      else {
  sprintf(buf,"%s\t%s\t%d\n",Who,What,WhatType);   snprintf(buf,MAX_BUF, "%s\t%s\t%d\n",Who,What,WhatType);
     }      }
     len=strlen(buf);      len=strlen(buf);
     for(i=1; i<socket_info.allocated_sockets; i++) {      for(i=1; i<socket_info.allocated_sockets; i++) {


Legend:
line(s) removed in v.1.17 
line(s) changed
 line(s) added in v.1.18

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