rpms/kismet/devel kismet-2007-01-R1-cast.patch, NONE, 1.1 kismet-2007-01-R1-printf.patch, NONE, 1.1

Enrico Scholz (ensc) fedora-extras-commits at redhat.com
Sun Feb 4 00:14:00 UTC 2007


Author: ensc

Update of /cvs/extras/rpms/kismet/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8883

Added Files:
	kismet-2007-01-R1-cast.patch kismet-2007-01-R1-printf.patch 
Log Message:
initial checkin (extracted from old patches)


kismet-2007-01-R1-cast.patch:

--- NEW FILE kismet-2007-01-R1-cast.patch ---
--- kismet-2007-01-R1b/gpsmap.cc.cast	2007-02-04 01:07:18.000000000 +0100
+++ kismet-2007-01-R1b/gpsmap.cc	2007-02-04 01:09:04.000000000 +0100
@@ -2242,12 +2242,8 @@
     pthread_attr_destroy(&attr);
 
     // Now wait for the threads to complete and come back
-    int thread_status;
-    for (int t = 0; t < numthreads; t++) {
-        void *tmp;
-        pthread_join(mapthread[t], &tmp);
-	thread_status = reinterpret_cast<int>(tmp);
-    }
+    for (int t = 0; t < numthreads; t++)
+        pthread_join(mapthread[t], 0);
 #else
     // Run one instance of our "thread".  thread number 0, it should just crunch it all
     pargs = new powerline_arg;

kismet-2007-01-R1-printf.patch:

--- NEW FILE kismet-2007-01-R1-printf.patch ---
--- kismet-2007-01-R1b/finitestate.cc.printf	2005-06-03 07:31:10.000000000 +0200
+++ kismet-2007-01-R1b/finitestate.cc	2007-02-04 00:52:52.000000000 +0100
@@ -224,8 +224,9 @@
 
             snprintf(atext, STATUS_MAX, "Out-of-sequence BSS timestamp on %s "
                      "- got %llx, expected %llx - this could indicate AP spoofing",
-                     in_info->bssid_mac.Mac2String().c_str(), in_info->timestamp,
-                     elem->bss_timestamp);
+                     in_info->bssid_mac.Mac2String().c_str(),
+		     static_cast<long long unsigned>(in_info->timestamp),
+                     static_cast<long long unsigned>(elem->bss_timestamp));
             atracker->RaiseAlert(alertid, in_info->bssid_mac, 0, 0, 0, 
 								 in_info->channel, atext);
 
--- kismet-2007-01-R1b/gpsmap.cc.printf	2007-02-04 00:48:01.000000000 +0100
+++ kismet-2007-01-R1b/gpsmap.cc	2007-02-04 00:58:27.000000000 +0100
@@ -1025,7 +1025,7 @@
     
     // Sanitize the data and build the map of points we don't look at
     if (verbose)
-        fprintf(stderr, "NOTICE:  Sanitizing %d sample points...\n", 
+        fprintf(stderr, "NOTICE:  Sanitizing %u sample points...\n", 
                 file_points.size());
     SanitizeSamplePoints(file_points, &file_screen);
 
@@ -2881,7 +2881,7 @@
     // contents
 
     // Test the standard text in col1
-    snprintf(text, 1024, "Visible networks: %d\n", drawn_net_map.size());
+    snprintf(text, 1024, "Visible networks: %u\n", drawn_net_map.size());
     text_colwidth = kismax(text_colwidth, IMStringWidth(text, leg_img, leg_di));
 
     snprintf(text, 1024, "Map Created     : %.24s", ctime((const time_t *) &curtime));
@@ -2972,7 +2972,7 @@
     cur_rowpos += tx_height + 2;
     */ 
 
-    snprintf(text, 1024, "Visible networks: %d\n", drawn_net_map.size());
+    snprintf(text, 1024, "Visible networks: %u\n", drawn_net_map.size());
     tx_height = IMStringHeight(text, leg_img, leg_di);
 
     snprintf(prim, 1024, "text %d,%d \"%s\"",
@@ -4393,7 +4393,7 @@
         gpsnetvec.push_back(x->second);
     }
 
-    fprintf(stderr, "Plotting %d networks...\n", gpsnetvec.size());
+    fprintf(stderr, "Plotting %u networks...\n", gpsnetvec.size());
 
     for (unsigned int x = 0; x < draw_feature_order.length(); x++) {
         switch (draw_feature_order[x]) {
--- kismet-2007-01-R1b/server_protocols.cc.printf	2007-01-15 16:14:48.000000000 +0100
+++ kismet-2007-01-R1b/server_protocols.cc	2007-02-04 00:53:43.000000000 +0100
@@ -515,7 +515,7 @@
     snprintf(tmpstr, 128, "%d", net->dupeiv_packets);
     data->ndvec.push_back(tmpstr);
 
-    snprintf(tmpstr, 128, "%lld", net->bss_timestamp);
+    snprintf(tmpstr, 128, "%lld", static_cast<long long int>(net->bss_timestamp));
     data->ndvec.push_back(tmpstr);
 
 }
--- kismet-2007-01-R1b/tcpclient.cc.printf	2006-04-26 05:52:04.000000000 +0200
+++ kismet-2007-01-R1b/tcpclient.cc	2007-02-04 00:55:48.000000000 +0100
@@ -401,6 +401,7 @@
 	int		tmpturbocell_mode;
 	int		tmpfirst_time;	// HACK: should be some 64-bit type
 	int		tmplast_time;	// HACK: should be some 64-bit type
+	long long int	tmpbss_timestamp;
         scanned = sscanf(in_data+hdrlen+18, "%d \001%255[^\001]\001 "
 						 "\001%255[^\001]\001 "
                          "%d %d %d %d %d %d %d %d %d %hd.%hd.%hd.%hd "
@@ -423,12 +424,13 @@
                          &aggregate_points, &datasize,
                          &turbocell_nid, &tmpturbocell_mode, 
                          &turbocell_sat, &carrier_set, &maxseenrate, 
-                         &encoding_set, &decrypted, &dupeiv_packets, &bss_timestamp);
+                         &encoding_set, &decrypted, &dupeiv_packets, &tmpbss_timestamp);
 	type           = static_cast<wireless_network_type>(tmptype);
 	first_time     = tmpfirst_time;
 	last_time      = tmplast_time;
 	atype          = static_cast<address_type>(tmpatype);
 	turbocell_mode = static_cast<turbocell_type>(tmpturbocell_mode);
+	bss_timestamp  = tmpbss_timestamp;
 	}
 	
         if (scanned < 51) {
--- kismet-2007-01-R1b/panelfront_display.cc.printf	2007-01-06 07:51:15.000000000 +0100
+++ kismet-2007-01-R1b/panelfront_display.cc	2007-02-04 00:57:13.000000000 +0100
@@ -1660,7 +1660,8 @@
 
 	// Added by Sven-Ola, may need le64_to_cpu()? Also added the bss_tsf
 	// to the kismet tcp protocol used between client and server
-	snprintf(output, print_width, "BSS Time: %llx", dnet->bss_timestamp);
+	snprintf(output, print_width, "BSS Time: %llx",
+		 static_cast<long long unsigned>(dnet->bss_timestamp));
         kwin->text.push_back(output);
 
         if (dnet->maxseenrate != 0) {
@@ -2612,7 +2613,7 @@
     snprintf(output, print_width, "Start   : %.24s", ctime((const time_t *) &start_time));
     details_text.push_back(output);
 
-    snprintf(output, print_width, "Servers : %d", context_list.size());
+    snprintf(output, print_width, "Servers : %u", context_list.size());
     details_text.push_back(output);
 
     snprintf(output, print_width, "Networks: %d", num_networks);




More information about the scm-commits mailing list