Skip to content

Commit

Permalink
updated image, little fix to client
Browse files Browse the repository at this point in the history
  • Loading branch information
esposem committed May 26, 2018
1 parent f194198 commit 3905bba
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Binary file modified .images/Paxos_images.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 6 additions & 4 deletions kpaxos/user_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ static struct client* client;
void
stop_execution(int sig)
{
int buff[2];
buff[0] = CLOSE_CONN;
buff[1] = client->learner_id;
eth_sendmsg(&client->ethop, client->learner_addr, buff, sizeof(buff));
if (stop) {
int buff[2];
buff[0] = CLOSE_CONN;
buff[1] = client->learner_id;
eth_sendmsg(&client->ethop, client->learner_addr, buff, sizeof(buff));
}
stop = 0;
}

Expand Down
2 changes: 0 additions & 2 deletions kpaxos/user_learner.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,12 @@ static void
change_conn_status(struct server* serv, char* mess, uint8_t dest_addr[ETH_ALEN])
{
int* buff = (int*)mess;
printf("Added connection\n");
if (buff[0] == OPEN_CONN) {
int id = add_connection(serv, buff[1], buff[2], dest_addr);
int buffs[2];
buffs[0] = OK;
buffs[1] = id;
eth_sendmsg(&serv->ethop, dest_addr, buffs, sizeof(buffs));
printf("Added connection\n");
}
if (buff[0] == CLOSE_CONN) {
rem_connection(serv, buff[1]);
Expand Down

0 comments on commit 3905bba

Please sign in to comment.