Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pa4
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nilesh Jagdish
pa4
Commits
de186436
Commit
de186436
authored
Nov 13, 2020
by
Saikumar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commented unnecessary printfs
parent
83c4a0ff
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
cache.cpp
cache.cpp
+1
-1
config.txt
config.txt
+1
-1
persistentStorage.cpp
persistentStorage.cpp
+5
-5
server.cpp
server.cpp
+1
-1
No files found.
cache.cpp
100644 → 100755
View file @
de186436
...
...
@@ -103,7 +103,7 @@ void insert(string key, string value) {
}
string
GET
(
string
key
)
{
printf
(
"GET function
\n
"
);
//
printf("GET function\n");
pthread_mutex_lock
(
&
cLock
);
string
ans
=
search
(
key
);
pthread_mutex_unlock
(
&
cLock
);
...
...
config.txt
View file @
de186436
127.1.1.2
20000
10
\ No newline at end of file
20
\ No newline at end of file
persistentStorage.cpp
View file @
de186436
...
...
@@ -613,7 +613,7 @@ string GETT(char * key){
}
else
{
printf
(
"%s = %s
\n
"
,
key
,
dh
->
key
);
//
printf("%s = %s \n",key ,dh->key);
if
((
tt
=
strcmp
(
key
,
dh
->
key
))
==
0
)
{
char
filename2
[
10
];
...
...
@@ -715,7 +715,7 @@ void PUTT(char *key,char *value){
write
(
n
,
ts
,
257
);
close
(
n
);
}
printf
(
"PUTT completed
\n
"
);
//
printf("PUTT completed\n");
sem_post
(
&
w
);
}
...
...
@@ -733,7 +733,7 @@ struct n2 * checkfile(struct n2 *h2,char *s){
else
{
// printf("%s = %s \n",h2->filename,s);
if
(
strcmp
(
h2
->
filename
,
s
)
==
0
){
printf
(
"if
\n
"
);
//
printf("if \n");
return
h2
;}
else
{
h2
=
h2
->
pointer
;
...
...
@@ -802,7 +802,7 @@ void pp(struct n1*r){
}
pp
(
r
->
p1
);
printf
(
"%s
\n
"
,
r
->
key
);
//
printf("%s\n",r->key);
pp
(
r
->
p2
);
}
...
...
@@ -810,7 +810,7 @@ void pp2(struct n1*r){
if
(
r
==
NULL
){
return
;
}
printf
(
"%s
\n
"
,
r
->
key
);
//
printf("%s\n",r->key);
pp2
(
r
->
p1
);
...
...
server.cpp
View file @
de186436
...
...
@@ -52,7 +52,7 @@ void *respondToClient(void *args) {
string
key_string
,
value_string
;
switch
(
todo
)
{
case
'1'
:
// printf("GET :\n");
printf
(
"GET :
\n
"
);
printf
(
"Key: %s
\n
"
,
key
);
// j = search(key);
// printf("j=%d\n", j);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment