Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add more tests in msg-suspend.
[simgrid.git] / examples / msg / bittorrent / connection.c
index d19d67c..c0ee2a5 100644 (file)
@@ -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. */
+
 #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->current_piece = -1;
   connection->interested = 0;
   connection->am_interested = 0;
   connection->choked_upload = 1;