Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
Hi,
I was wondering why the usage page showed bogus entries, and it
seems it is a small uninitialized buffer problem.
Please remove all (my) bogus entries (running revision 2197) from
the usage counter.
The following patch fixes the problem, but having a comment
parameter in the drbd.conf is of course better.
Index: user/drbdadm_usage_cnt.c
===================================================================
--- user/drbdadm_usage_cnt.c (revision 2197)
+++ user/drbdadm_usage_cnt.c (working copy)
@@ -357,12 +357,11 @@
REL_VERSION,ni.node_uuid, ni.version_code);
fgets(answer,ANSWER_SIZE,stdin);
if(!strcmp(answer,"no\n")) send = 0;
+ url_encode(answer,n_comment);
+ } else {
+ n_comment[0]=0;
}
-
- n_comment[0]=0;
- url_encode(answer,n_comment);
-
ssprintf(req_buf,"GET http://"HTTP_HOST"/cgi-bin/insert_usage.pl?"
"nu="U64"&nv="U32"%s%s HTTP/1.0\n\n",
ni.node_uuid, ni.version_code,
--
begin LOVE-LETTER-FOR-YOU.txt.vbs
I am a signature virus. Distribute me until the bitter
end