Bryan Drewery 21 ani în urmă
părinte
comite
cb929cf517
3 a modificat fișierele cu 5 adăugiri și 5 ștergeri
  1. 2 2
      src/dcc.h
  2. 1 1
      src/dccutil.c
  3. 2 2
      src/mod/transfer.mod/transfer.c

+ 2 - 2
src/dcc.h

@@ -99,12 +99,12 @@ struct xfer_info {
   unsigned long int offset;     /* offset from beginning of file, during
 
                                    resend.                                 */
-  unsigned long int block_pending;  	/* bytes of this DCC block which weren't sent yet. */
+  unsigned long block_pending; 	/* bytes of this DCC block which weren't sent yet. */
   unsigned int type;            /* xfer connection type, see enum below    */
   time_t start_time;            /* Time when a xfer was started.           */
-  unsigned char sofar;          /* how much of the byte count received     */
   char *filename;
   char *origname;
+  unsigned char sofar;          /* how much of the byte count received     */
   unsigned short ack_type;      /* type of ack                             */
   char dir[DIRLEN];             /* used when uploads go to the current dir */
   char from[NICKLEN];           /* [GET] user who offered the file         */

+ 1 - 1
src/dccutil.c

@@ -516,7 +516,7 @@ int new_dcc(struct dcc_table *type, int xtra_size)
   if (xtra_size)
     dcc[i].u.other = (char *) calloc(1, xtra_size);
 
-  sdprintf("new_dcc: %d (dccn/dcc_total: %d/%d)", i, dccn, dcc_total);
+  sdprintf("new_dcc (%s): %d (dccn/dcc_total: %d/%d)", type->name, i, dccn, dcc_total);
   return i;
 }
 

+ 2 - 2
src/mod/transfer.mod/transfer.c

@@ -65,7 +65,7 @@ static void wipe_tmp_filename(char *fn, int idx)
   if (!copy_to_tmp)
     return;
   for (i = 0; i < dcc_total; i++) {
-    if (dcc[i].type && i != idx && dcc[i].type == &DCC_GET || dcc[i].type == &DCC_GET_PENDING) {
+    if (dcc[i].type && i != idx && (dcc[i].type == &DCC_GET || dcc[i].type == &DCC_GET_PENDING)) {
       if (!strcmp(dcc[i].u.xfer->filename, fn)) {
         ok = 0;
         break;
@@ -83,7 +83,7 @@ static int at_limit(char *nick)
   int i, x = 0;
 
   for (i = 0; i < dcc_total; i++)
-    if (dcc[i].type && dcc[i].type == &DCC_GET || dcc[i].type == &DCC_GET_PENDING)
+    if (dcc[i].type && (dcc[i].type == &DCC_GET || dcc[i].type == &DCC_GET_PENDING))
       if (!egg_strcasecmp(dcc[i].nick, nick))
 	x++;
   return (x >= dcc_limit);