[pisa-src] r2905 - in trunk/community-operator/server: call-hipconf.c cgi-bin.c main.c

  • From: Christoph Viethen <christoph.viethen@xxxxxxxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Thu, 08 Mar 2012 15:16:08 +0100

Author: viethen
Date: Thu Mar  8 15:16:06 2012
New Revision: 2905

Log:
Adapt CO binary to deal with new hipconf syntax.

Modified:
   trunk/community-operator/server/call-hipconf.c
   trunk/community-operator/server/cgi-bin.c
   trunk/community-operator/server/main.c

Modified: trunk/community-operator/server/call-hipconf.c
==============================================================================
--- trunk/community-operator/server/call-hipconf.c      Thu Mar  1 14:22:03 
2012        (r2904)
+++ trunk/community-operator/server/call-hipconf.c      Thu Mar  8 15:16:06 
2012        (r2905)
@@ -45,15 +45,15 @@
         return -1;
     }
 
-    if (num_params == 3 && !strcmp("get", params[1]) && !strcmp("hi", 
params[2]) && !strcmp("default", params[3])) {
+    if (num_params == 4 && !strcmp("daemon", params[1]) && !strcmp("get", 
params[2]) && !strcmp("hi", params[3]) && !strcmp("default", params[4])) {
         return 0;
     }
 
-    if (num_params == 3 && !strcmp("get", params[1]) && !strcmp("ha", 
params[2]) && !strcmp("all", params[3])) {
+    if (num_params == 4 && !strcmp("daemon", params[1]) && !strcmp("get", 
params[2]) && !strcmp("ha", params[3]) && !strcmp("all", params[4])) {
         return 0;
     }
 
-    if (num_params == 3 && !strcmp("acquire", params[1]) && 
!strcmp("certificate", params[2])) {
+    if ((num_params == 4 || num_params == 5) && !strcmp("daemon", params[1]) 
&& !strcmp("acquire", params[2]) && !strcmp("certificate", params[3])) {
         /* FIXME: definitely would like more checking code here */
         return 0;
     }

Modified: trunk/community-operator/server/cgi-bin.c
==============================================================================
--- trunk/community-operator/server/cgi-bin.c   Thu Mar  1 14:22:03 2012        
(r2904)
+++ trunk/community-operator/server/cgi-bin.c   Thu Mar  8 15:16:06 2012        
(r2905)
@@ -33,8 +33,6 @@
 {
     const char *content_string = (content_flag == 1 ? 
"application/octet-stream" : (content_flag == 2 ? "application/pkix-cert" : 
"text/plain"));
 
-    printf("content_string = %s\n", content_string);
-
     printf("Content-type: %s\nStatus: %d\nServer: MobileACcess 
HTTP-CO\n%s\n%s%s", content_string, errcode, \
            (errcode == 503 ? "Retry-after: 300\n" : ""), (message != NULL) ? 
message : "", (message != NULL) ? "\n" : "");
 }

Modified: trunk/community-operator/server/main.c
==============================================================================
--- trunk/community-operator/server/main.c      Thu Mar  1 14:22:03 2012        
(r2904)
+++ trunk/community-operator/server/main.c      Thu Mar  8 15:16:06 2012        
(r2905)
@@ -133,7 +133,7 @@
     /* ask hipconf to output the certificate that we need into a pipe
      *  - hipconf really should allow for specifying the end of the validity
      *  period of the certificate! */
-    const int retcode = call_hipconf(&hipconf_pipe, "acquire", "certificate", 
caller_string, (char *) NULL);
+    const int retcode = call_hipconf(&hipconf_pipe, "daemon", "acquire", 
"certificate", caller_string, (char *) NULL);
 
     if (retcode < 0) {
         switch (retcode) {
-- 
This is the pisa developer mailing list. Please also subscribe to the main pisa 
list at:
//www.freelists.org/list/pisa

Other related posts:

  • » [pisa-src] r2905 - in trunk/community-operator/server: call-hipconf.c cgi-bin.c main.c - Christoph Viethen