Rename struct rc4_context and stream cipher send/receive functions.
[paraslash.git] / recv_common.c
index bbaf139688ff6ccb0d78284f1bb495e7dd106a86..3fe2a139e0b6a6b270dce5e548e18d76d63ae1aa 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2009 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2006-2011 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -55,7 +55,7 @@ static void *parse_receiver_args(int receiver_num, char *options)
        }
        argv[0] = make_message("%s_recv", r->name);
        conf = r->parse_config(argc, argv);
-       for (i = 1; i < argc; i++)
+       for (i = 0; i < argc; i++)
                free(argv[i]);
        free(argv);
        return conf;
@@ -129,9 +129,7 @@ int generic_recv_pre_select(struct sched *s, struct task *t)
        int ret = btr_node_status(rn->btrn, 0, BTR_NT_ROOT);
 
        t->error = 0;
-       if (ret < 0) {
-               s->timeout.tv_sec = 0;
-               s->timeout.tv_usec = 1;
-       }
+       if (ret < 0)
+               sched_min_delay(s);
        return ret;
 }