You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by st...@apache.org on 2005/06/09 22:43:39 UTC

svn commit: r189814 - /httpd/mod_arm4/trunk/mod_arm4.c

Author: stoddard
Date: Thu Jun  9 13:43:38 2005
New Revision: 189814

URL: http://svn.apache.org/viewcvs?rev=189814&view=rev
Log:
Register the PLUGINTYPE application property. Ideally setting properties should be configurable, but lets go with this for now. If we get more requirements, we can get more creative with the solution

Modified:
    httpd/mod_arm4/trunk/mod_arm4.c

Modified: httpd/mod_arm4/trunk/mod_arm4.c
URL: http://svn.apache.org/viewcvs/httpd/mod_arm4/trunk/mod_arm4.c?rev=189814&r1=189813&r2=189814&view=diff
==============================================================================
--- httpd/mod_arm4/trunk/mod_arm4.c (original)
+++ httpd/mod_arm4/trunk/mod_arm4.c Thu Jun  9 13:43:38 2005
@@ -95,6 +95,7 @@
 /* Per server config */
 #define DEFAULT_TRAN_NAME "HTTP Request"
 #define DEFAULT_APP_NAME  "Apache HTTP Server"
+#define DEFAULT_PLUGINTYPE  "Apache"
 typedef struct server_config {
     arm_id_t app_id;
     arm_id_t tran_id;
@@ -300,12 +301,15 @@
     arm_error_t                     arm_rc;
     server_config_t                 *sconf;
 
-    arm_buffer4_t                   cnbuf; /* context name buf */
+    arm_buffer4_t                   api_buff4;    /*ARM buffer4*/
     arm_subbuffer_t                 *subbuf;
+    arm_subbuffer_app_identity_t    *sb_appl_identity;
     arm_subbuffer_tran_identity_t   *sb_tran_identity;
 
     char *app_group;
     char *app_instance;
+    
+    arm_property_t appl_identity_properties[1];
 
     const arm_char_t *tran_context_names[] = {
         "ServerVersion",
@@ -341,8 +345,23 @@
     /* 
      * Register application class with arm agent 
      */
+    appl_identity_properties[0].name = "PluginType";
+    appl_identity_properties[0].value = DEFAULT_PLUGINTYPE;
+    
+    sb_appl_identity = apr_pcalloc(p, sizeof(*sb_appl_identity));
+    
+    sb_appl_identity->header.format = ARM_SUBBUFFER_APP_IDENTITY;
+    sb_appl_identity->identity_property_count = 1;
+    sb_appl_identity->identity_property_array = &appl_identity_properties[0];
+    sb_appl_identity->context_name_count = 0;
+    sb_appl_identity->context_name_array = NULL;
+
+    subbuf = (arm_subbuffer_t *) sb_appl_identity;
+    api_buff4.count = 1;
+    api_buff4.subbuffer_array = &subbuf;
+     
     arm_rc = ap_arm_register_application(sconf->app_name, ARM_ID_NONE, 
-                                         ARM_FLAG_NONE, ARM_BUF4_NONE,
+                                         ARM_FLAG_NONE, &api_buff4,
                                          &(sconf->app_id));
     if (arm_rc < 0) {
         ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, 
@@ -370,14 +389,14 @@
     sb_tran_identity->uri = NULL;
 
     subbuf = (arm_subbuffer_t *) sb_tran_identity;
-    cnbuf.count = 1;
-    cnbuf.subbuffer_array = &subbuf;
+    api_buff4.count = 1;
+    api_buff4.subbuffer_array = &subbuf;
 
     arm_rc = ap_arm_register_transaction(&(sconf->app_id),
                                          sconf->tran_name,
                                          ARM_ID_NONE,
                                          ARM_FLAG_NONE, 
-                                         &cnbuf,
+                                         &api_buff4,
                                          &(sconf->tran_id));
     if (arm_rc < 0) {
         ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,