A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use host's RngStream, instead of creating another one.
[simgrid.git]
/
examples
/
msg
/
bittorrent
/
connection.c
diff --git
a/examples/msg/bittorrent/connection.c
b/examples/msg/bittorrent/connection.c
index
d19d67c
..
c0ee2a5
100644
(file)
--- a/
examples/msg/bittorrent/connection.c
+++ b/
examples/msg/bittorrent/connection.c
@@
-1,8
+1,9
@@
-
/* Copyright (c) 2012
. The SimGrid Team.
-
* All rights reserved. */
+
/* Copyright (c) 2012-2014
. The SimGrid Team.
+ * All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+
#include "connection.h"
#include "bittorrent.h"
#include <xbt/sysdep.h>
#include "connection.h"
#include "bittorrent.h"
#include <xbt/sysdep.h>
@@
-15,6
+16,7
@@
connection_t connection_new(int id)
connection->id = id;
connection->mailbox = bprintf("%d", id);
connection->bitfield = NULL;
connection->id = id;
connection->mailbox = bprintf("%d", id);
connection->bitfield = NULL;
+ connection->current_piece = -1;
connection->interested = 0;
connection->am_interested = 0;
connection->choked_upload = 1;
connection->interested = 0;
connection->am_interested = 0;
connection->choked_upload = 1;