src/server/daemon/httprequest.c

changeset 21
627b09ee74e4
parent 20
7b235fa88008
child 22
adb0bda54e6b
--- a/src/server/daemon/httprequest.c	Sat Jan 28 16:01:07 2012 +0100
+++ b/src/server/daemon/httprequest.c	Mon Feb 13 13:49:49 2012 +0100
@@ -162,8 +162,6 @@
     // TODO: decode abs_path
 
     /* Pass the abs_path as 'uri' in reqpb */
-    // TODO: pass abs_path to reqpb
-    // TODO: replace this code
     pblock_kvinsert(
             pb_key_uri,
             absPath.ptr,
@@ -289,7 +287,7 @@
                 nsapi_context_next_stage(&rq->context);
             }
             case NSAPINameTrans: {
-                printf(">>> NameTrans\n");
+                //printf(">>> NameTrans\n");
                 r = nsapi_nametrans(sn, rq);
                 if(r != REQ_PROCEED) {
                     break;
@@ -298,12 +296,12 @@
                 nsapi_context_next_stage(&rq->context);
             }
             case NSAPIPathCheck: {
-                printf(">>> PathCheck\n");
+                //printf(">>> PathCheck\n");
                 rq->phase++;
                 nsapi_context_next_stage(&rq->context);
             }
             case NSAPIObjectType: {
-                printf(">>> ObjectType\n");
+                //printf(">>> ObjectType\n");
                 r = nsapi_objecttype(sn, rq);
                 if(r != REQ_PROCEED) {
                     break;
@@ -312,7 +310,7 @@
                 nsapi_context_next_stage(&rq->context);
             }
             case NSAPIService: {
-                printf(">>> Service\n");
+                //printf(">>> Service\n");
                 r = nsapi_service(sn, rq);
                 if(r != REQ_PROCEED) {
                     break;
@@ -321,12 +319,12 @@
                 nsapi_context_next_stage(&rq->context);
             }
             case NSAPIAddLog: {
-                printf(">>> AddLog\n");
+                //printf(">>> AddLog\n");
                 rq->phase++;
                 nsapi_context_next_stage(&rq->context);
             }
             case REQ_FINISH: {
-                printf(">>> Finish\n");
+                //printf(">>> Finish\n");
                 r = nsapi_finish_request(sn, rq);
             }
         }
@@ -345,7 +343,7 @@
 
 int nsapi_nametrans(NSAPISession *sn, NSAPIRequest *rq) {
     HTTPObjectConfig *objconf = rq->vs->objects;
-    printf("nsapi_nametrans\n");
+    //printf("nsapi_nametrans\n");
     httpd_objset *objset = objset_create(sn->sn.pool);
     rq->rq.os = objset;
     /* first object in objconf is the default object  TODO: make sure it is */
@@ -419,7 +417,7 @@
 }
 
 int nsapi_objecttype(NSAPISession *sn, NSAPIRequest *rq) {
-    printf("nsapi_objecttype\n");
+    //printf("nsapi_objecttype\n");
     httpd_objset *objset = rq->rq.os;
 
     if(NCX_OI(rq) == -1) {
@@ -486,7 +484,7 @@
 }
 
 int nsapi_service(NSAPISession *sn, NSAPIRequest *rq) {
-    printf("nsapi_service\n");
+    //printf("nsapi_service\n");
     httpd_objset *objset = rq->rq.os;
 
     if(NCX_OI(rq) == -1) {
@@ -531,6 +529,7 @@
                 }
             }
 
+            /* execute the saf */
             ret = d->func->func(d->param, (Session*)sn, (Request*)rq);
             if(ret != REQ_PROCEED) {
                 fprintf(stderr, "saf not proceed\n");

mercurial