Commit a7870063 authored by AXEL JAMES's avatar AXEL JAMES

bug fixes

parent 05ebb3df
xmpld1,val1123123
xmpld,val1123123
No preview for this file type
...@@ -35,4 +35,4 @@ void createNodeStruct(Node *givenNode,char ip[16],int port,int id); ...@@ -35,4 +35,4 @@ void createNodeStruct(Node *givenNode,char ip[16],int port,int id);
void stabilize(); void stabilize();
Node getSuccessor(); Node getSuccessor();
void sendUDP(char * msg, char ip[], int port, bool recvResponse, char * buffer); void sendUDP(char * msg, char ip[], int port, bool recvResponse, char * buffer);
int nodeToId(struct sockaddr_in *socketAddr) int nodeToId(struct sockaddr_in *socketAddr);
\ No newline at end of file \ No newline at end of file
File added
No preview for this file type
...@@ -160,7 +160,7 @@ void TransferKeys(int id, char ip[], int port) { ...@@ -160,7 +160,7 @@ void TransferKeys(int id, char ip[], int port) {
/* code */ /* code */
// int setNo = getFileId(key); // int setNo = getFileId(key);
char fileName[10]; char fileName[20];
// sprintf(fileName,"%d",i); // sprintf(fileName,"%d",i);
sprintf(fileName,"%s%d",dir,i); sprintf(fileName,"%s%d",dir,i);
strcat(fileName,".csv"); strcat(fileName,".csv");
...@@ -194,7 +194,7 @@ void TransferKeys(int id, char ip[], int port) { ...@@ -194,7 +194,7 @@ void TransferKeys(int id, char ip[], int port) {
///////////////add end///////////////// ///////////////add end/////////////////
free(storedKey); free(storedKey);
return NULL; return;
} }
......
#include<stdbool.h> #include<stdbool.h>
bool dumpToFile(char* key,char* val); bool dumpToFile(char* key,char* val);
bool deleteStore(char* key); bool deleteStore(char* key);
char* restoreFromFile(char* key); char* restoreFromFile(char* key);
char* TransferKeys(int id, char ip[], int port); void TransferKeys(int id, char ip[], int port);
void initStore(); void initStore();
char * dir[15]; char dir[15];
No preview for this file type
No preview for this file type
No preview for this file type
File added
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment