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
do not build the examples by default, only when running 'make tests'
[simgrid.git]
/
teshsuite
/
msg
/
app-bittorrent
/
connection.c
diff --git
a/teshsuite/msg/app-bittorrent/connection.c
b/teshsuite/msg/app-bittorrent/connection.c
index
24a27d7
..
d632552
100644
(file)
--- a/
teshsuite/msg/app-bittorrent/connection.c
+++ b/
teshsuite/msg/app-bittorrent/connection.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 2012-201
4
. The SimGrid Team.
+/* Copyright (c) 2012-201
9
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-9,12
+9,12
@@
#include <xbt/sysdep.h>
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(msg_peers);
#include <xbt/sysdep.h>
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(msg_peers);
-connection_t connection_new(
const char*
id)
+connection_t connection_new(
int
id)
{
connection_t connection = xbt_new(s_connection_t, 1);
{
connection_t connection = xbt_new(s_connection_t, 1);
- connection->id =
xbt_strdup(id)
;
- connection->mailbox =
xbt_strdup(
id);
+ connection->id =
id
;
+ connection->mailbox =
bprintf("%d",
id);
connection->bitfield = 0;
connection->current_piece = -1;
connection->interested = 0;
connection->bitfield = 0;
connection->current_piece = -1;
connection->interested = 0;
@@
-35,7
+35,6
@@
void connection_add_speed_value(connection_t connection, double speed)
void connection_free(void* data)
{
connection_t co = (connection_t)data;
void connection_free(void* data)
{
connection_t co = (connection_t)data;
- xbt_free(co->id);
xbt_free(co->mailbox);
xbt_free(co);
}
xbt_free(co->mailbox);
xbt_free(co);
}