From owner-p4-projects@FreeBSD.ORG Mon Jul 12 03:11:45 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F286F10657A6; Mon, 12 Jul 2010 03:11:44 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 915E5106573C for ; Mon, 12 Jul 2010 03:11:44 +0000 (UTC) (envelope-from ligregni@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7F7088FC15 for ; Mon, 12 Jul 2010 03:11:44 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o6C3BixF053781 for ; Mon, 12 Jul 2010 03:11:44 GMT (envelope-from ligregni@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o6C3BiEP053779 for perforce@freebsd.org; Mon, 12 Jul 2010 03:11:44 GMT (envelope-from ligregni@FreeBSD.org) Date: Mon, 12 Jul 2010 03:11:44 GMT Message-Id: <201007120311.o6C3BiEP053779@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to ligregni@FreeBSD.org using -f From: Sergio Ligregni To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 180793 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 03:11:45 -0000 http://p4web.freebsd.org/@@180793?ac=10 Change 180793 by ligregni@ligPhenom on 2010/07/12 03:10:46 The functionality of the project is working The missing things (for second half) are: SSL integration with audit Affected files ... .. //depot/projects/soc2010/disaudit/damasterd.c#4 edit .. //depot/projects/soc2010/disaudit/damasterd.h#4 edit .. //depot/projects/soc2010/disaudit/msocket_work.c#4 edit .. //depot/projects/soc2010/disaudit/msocket_work.h#4 edit .. //depot/projects/soc2010/disaudit/shipd.c#7 edit .. //depot/projects/soc2010/disaudit/shipd.h#7 edit .. //depot/projects/soc2010/disaudit/ssocket_work.c#5 edit .. //depot/projects/soc2010/disaudit/ssocket_work.h#5 edit Differences ... ==== //depot/projects/soc2010/disaudit/damasterd.c#4 (text+ko) ==== @@ -123,6 +123,7 @@ void to_log(char *message) { +return; if (debug) perror(message); else @@ -217,7 +218,7 @@ { int res = 0; - char opt[1]; + char opt[2]; get_from_socket(sfd, opt); @@ -396,7 +397,7 @@ char dirpath[MAX_DIR_SIZE+1]; time_t mtime; struct tm *ltime; - unsigned long file_size; + unsigned file_size; int fd, bwrtn, bread; get_from_socket(sfd, pathslave); ==== //depot/projects/soc2010/disaudit/damasterd.h#4 (text+ko) ==== ==== //depot/projects/soc2010/disaudit/msocket_work.c#4 (text+ko) ==== ==== //depot/projects/soc2010/disaudit/msocket_work.h#4 (text+ko) ==== ==== //depot/projects/soc2010/disaudit/shipd.c#7 (text+ko) ==== @@ -133,6 +133,7 @@ void to_log(char *message) { +return; if (debug) perror(message); else @@ -350,7 +351,7 @@ return; } -printf("TT %s\n", dirp->d_name); +//printf("TT %s\n", dirp->d_name); if (S_ISDIR(statbuf.st_mode) == 0) /* It's not a directory */ if ( is_audit_trail(dirp->d_name) ) /* It's not other file */ @@ -400,8 +401,12 @@ free(trail_paths[i]); free(trail_paths); +pll(root); + is_in_master(root, &index); +pll(root); + /* * At this point, the variable index holds the index of the first ok trail in master system * and we will go backwards (index-1 ... 0) in the array to sync the newer ones @@ -494,6 +499,9 @@ close(sockfd); + if (first_found != NULL) + *first_found = counter; + free(md5); return ret_val; @@ -599,6 +607,10 @@ { trail_entry *temp = *root, *oth; int total = 0; + + if (number == 0) + break; + while (temp) { ++total; @@ -610,6 +622,9 @@ number = total - number; /* How many we will be left in the queue */ oth = temp = *root; + + if (!number) + *root = NULL; while (temp && number--) { @@ -629,7 +644,6 @@ temp = oth; } - *root = temp; break; } case DEL_ALL: ==== //depot/projects/soc2010/disaudit/shipd.h#7 (text+ko) ==== ==== //depot/projects/soc2010/disaudit/ssocket_work.c#5 (text+ko) ==== @@ -47,7 +47,7 @@ send_to_socket(sockfd, path ? "1" : "0"); if (path) /* If there is a file to search for */ { - char *result; + char result[2]; send_to_socket(sockfd, path); send_to_socket(sockfd, md5); @@ -78,7 +78,7 @@ if (path) /* If there is a file to send through the socket */ { int fd = open(fullpath, O_RDONLY); - unsigned long file_size; + unsigned file_size; int bread; struct stat statbuf; ==== //depot/projects/soc2010/disaudit/ssocket_work.h#5 (text+ko) ====