[DRBD-cvs] svn commit by phil - r2198 - trunk/user - A variation of Ard van Breemen's patch to fix the unini

drbd-cvs at lists.linbit.com drbd-cvs at lists.linbit.com
Fri May 5 13:09:30 CEST 2006


Author: phil
Date: 2006-05-05 13:09:29 +0200 (Fri, 05 May 2006)
New Revision: 2198

Modified:
   trunk/user/drbdadm_usage_cnt.c
Log:
A variation of Ard van Breemen's patch to fix the uninitialized
buffer...


Modified: trunk/user/drbdadm_usage_cnt.c
===================================================================
--- trunk/user/drbdadm_usage_cnt.c	2006-05-02 21:19:31 UTC (rev 2197)
+++ trunk/user/drbdadm_usage_cnt.c	2006-05-05 11:09:29 UTC (rev 2198)
@@ -331,7 +331,8 @@
 	}
 
 	if(!send) return;
-	
+
+	n_comment[0]=0;
 	if (type == UC_ASK ) {
 		printf(
 "\n"
@@ -357,12 +358,9 @@
 			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);
 	}
 
-
-	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,



More information about the drbd-cvs mailing list