fixes of some build warnings; log4c still to be fixed
authorZdeněk Šustr <sustr4@cesnet.cz>
Fri, 19 Mar 2010 09:17:33 +0000 (09:17 +0000)
committerZdeněk Šustr <sustr4@cesnet.cz>
Fri, 19 Mar 2010 09:17:33 +0000 (09:17 +0000)
org.glite.lb.logger/src/interlogd.c
org.glite.lb.logger/src/logd.c

index f1ea6ec..dcce820 100644 (file)
@@ -26,6 +26,7 @@ limitations under the License.
 #include <string.h>
 #include <signal.h>
 #include <pthread.h>
+#include <unistd.h>
 #include <errno.h>
 #include <assert.h>
 #include <sys/stat.h>
@@ -362,10 +363,11 @@ void handle_signal(int num) {
 
        switch(num) {
        case SIGHUP:
-               log4c_reread();
+               glite_common_log_reread();
                break;
 
        case SIGUSR1:
+               /* FIXME:
                glite_common_log(LOG_CATEGORY_CONTROL, LOG_PRIORITY_INFO,
                                 "Logging priority is now %s for %s, %s for %s and %s for %s\n", 
                                 log4c_priority_to_string(log4c_category_get_priority(log4c_category_get(LOG_CATEGORY_SECURITY))),
@@ -374,9 +376,11 @@ void handle_signal(int num) {
                                 LOG_CATEGORY_ACCESS,
                                 log4c_priority_to_string(log4c_category_get_priority(log4c_category_get(LOG_CATEGORY_CONTROL))),
                                 LOG_CATEGORY_CONTROL);
+               */
                break;
 
        case SIGUSR2:
+               /* FIXME:
                glite_common_log(LOG_CATEGORY_CONTROL, LOG_PRIORITY_INFO,
                                 "Logging priority is now %s for %s, %s for %s, %s for %s and %s for %s\n", 
                                 log4c_priority_to_string(log4c_category_get_priority(log4c_category_get(LOG_CATEGORY_LB))),
@@ -387,6 +391,7 @@ void handle_signal(int num) {
                                 LOG_CATEGORY_LB_IL,
                                 log4c_priority_to_string(log4c_category_get_priority(log4c_category_get(LOG_CATEGORY_LB_SERVER))),
                                 LOG_CATEGORY_LB_SERVER);
+               */
                break;
 
        case SIGPIPE:
@@ -432,8 +437,8 @@ main (int argc, char **argv)
   }
 
   /* check for reasonable queue lengths */
-  if(queue_size_low == 0 && queue_size_high > 0 ||
-     queue_size_low > queue_size_high) {
+  if((queue_size_low == 0 && queue_size_high > 0) ||
+     (queue_size_low > queue_size_high)) {
          glite_common_log(LOG_CATEGORY_CONTROL, LOG_PRIORITY_FATAL, "max queue length -Q must be greater than low queue length -q, both or none must be specified!");
          exit(EXIT_FAILURE);
   }
index 003783e..7f996e1 100644 (file)
@@ -145,6 +145,7 @@ void handle_signal(int num) {
                /* TODO: probably also restart parent logd process? */
                break;
        case SIGUSR1:
+               /* FIXME: 
                glite_common_log(LOG_CATEGORY_CONTROL,LOG_PRIORITY_INFO,
                        "Logging priority is now %s for %s, %s for %s and %s for %s\n", 
                        log4c_priority_to_string(log4c_category_get_priority(log4c_category_get(LOG_CATEGORY_SECURITY))),
@@ -153,8 +154,10 @@ void handle_signal(int num) {
                        LOG_CATEGORY_ACCESS,
                        log4c_priority_to_string(log4c_category_get_priority(log4c_category_get(LOG_CATEGORY_CONTROL))),
                        LOG_CATEGORY_CONTROL);
+               */
                break;
        case SIGUSR2:
+               /* FIXME: 
                glite_common_log(LOG_CATEGORY_CONTROL,LOG_PRIORITY_INFO,
                        "Logging priority is now %s for %s, %s for %s, %s for %s and %s for %s\n", 
                        log4c_priority_to_string(log4c_category_get_priority(log4c_category_get(LOG_CATEGORY_LB))),
@@ -165,6 +168,7 @@ void handle_signal(int num) {
                        LOG_CATEGORY_LB_IL,
                        log4c_priority_to_string(log4c_category_get_priority(log4c_category_get(LOG_CATEGORY_LB_SERVER))),
                        LOG_CATEGORY_LB_SERVER);
+               */
                break;
        case SIGPIPE:
                glite_common_log(LOG_CATEGORY_CONTROL,LOG_PRIORITY_INFO,"Broken pipe, lost communication channel.\n");
@@ -324,7 +328,6 @@ doit(int socket, edg_wll_GssCred cred_handle, char *file_name_prefix, int noipc,
 
     }
 
-doit_end:
        edg_wll_gss_close(&con, NULL);
        if (con.sock == -1) 
                glite_common_log(LOG_CATEGORY_ACCESS,LOG_PRIORITY_WARN, "Error closing descriptor '%d'.",con.sock);
@@ -349,9 +352,9 @@ int main(int argc, char *argv[])
    int listener_fd;
    int client_fd;
    struct sockaddr_storage client_addr;
-   int client_addr_len;
+   socklen_t client_addr_len;
 
-   time_t      cert_mtime = 0, key_mtime = 0;
+   time_t      cert_mtime = 0;
    edg_wll_GssStatus   gss_stat;
    edg_wll_GssCred     cred = NULL;
 
@@ -566,7 +569,6 @@ This is LocalLogger, part of Workload Management System in EU DataGrid & EGEE.\n
 #endif
     } /* while */
 
-end:
        if (listener_fd) close(listener_fd);
        edg_wll_gss_release_cred(&cred, NULL);
        exit(ret);