Remove a silly static
authorVolker Lendecke <vl@samba.org>
Thu, 27 Dec 2007 20:30:15 +0000 (21:30 +0100)
committerVolker Lendecke <vl@samba.org>
Thu, 27 Dec 2007 21:33:02 +0000 (22:33 +0100)
(This used to be commit ef75dcc9ffda85d77c8f22d0db702efbf8e642ed)

source3/rpc_server/srv_srvsvc_nt.c

index 3cc2472116a7793b677d223ff557ecc3303fef00..842a28c7761ac7c506200e349e895415d92be60d 100644 (file)
@@ -870,13 +870,11 @@ static void init_srv_sess_info_0(pipes_struct *p, SRV_SESS_INFO_0 *ss0, uint32 *
 /*******************************************************************
 ********************************************************************/
 
-/* global needed to make use of the share_mode_forall() callback */
-static struct sess_file_count s_file_cnt;
-
 static void sess_file_fn( const struct share_mode_entry *e, 
-                          const char *sharepath, const char *fname, void *state )
+                          const char *sharepath, const char *fname,
+                         void *data )
 {
-       struct sess_file_count *sess = &s_file_cnt;
+       struct sess_file_count *sess = (struct sess_file_count *)data;
  
        if ( procid_equal(&e->pid, &sess->pid) && (sess->uid == e->uid) ) {
                sess->count++;
@@ -890,11 +888,13 @@ static void sess_file_fn( const struct share_mode_entry *e,
 
 static int net_count_files( uid_t uid, struct server_id pid )
 {
+       struct sess_file_count s_file_cnt;
+
        s_file_cnt.count = 0;
        s_file_cnt.uid = uid;
        s_file_cnt.pid = pid;
        
-       share_mode_forall( sess_file_fn, NULL );
+       share_mode_forall( sess_file_fn, &s_file_cnt );
        
        return s_file_cnt.count;
 }