Convert all uses of uint8/16/32 to _t in nmbd and the include file.
[samba.git] / source3 / nmbd / nmbd_incomingdgrams.c
index 153a86db55549c4ad775fcb14d4e6f11c209b8e9..b728c13e5fe000d2d0750cf74e05ce3b1716a4d3 100644 (file)
@@ -23,7 +23,6 @@
 #include "includes.h"
 #include "../librpc/gen_ndr/svcctl.h"
 #include "nmbd/nmbd.h"
-#include "smbprofile.h"
 
 extern bool found_lm_clients;
 
@@ -100,15 +99,13 @@ void process_host_announce(struct subnet_record *subrec, struct packet_struct *p
        struct dgram_packet *dgram = &p->packet.dgram;
        int ttl = IVAL(buf,1)/1000;
        unstring announce_name;
-       uint32 servertype = IVAL(buf,23);
+       uint32_t servertype = IVAL(buf,23);
        fstring comment;
        struct work_record *work;
        struct server_record *servrec;
        unstring work_name;
        unstring source_name;
 
-       START_PROFILE(host_announce);
-
        pull_ascii_fstring(comment, buf+31);
   
        pull_ascii_nstring(announce_name, sizeof(announce_name), buf+5);
@@ -187,8 +184,7 @@ void process_host_announce(struct subnet_record *subrec, struct packet_struct *p
 
        subrec->work_changed = True;
 done:
-
-       END_PROFILE(host_announce);
+       return;
 }
 
 /*******************************************************************
@@ -201,13 +197,11 @@ void process_workgroup_announce(struct subnet_record *subrec, struct packet_stru
        int ttl = IVAL(buf,1)/1000;
        unstring workgroup_announce_name;
        unstring master_name;
-       uint32 servertype = IVAL(buf,23);
+       uint32_t servertype = IVAL(buf,23);
        struct work_record *work;
        unstring source_name;
        unstring dest_name;
 
-       START_PROFILE(workgroup_announce);
-
        pull_ascii_nstring(workgroup_announce_name,sizeof(workgroup_announce_name),buf+5);
        pull_ascii_nstring(master_name,sizeof(master_name),buf+31);
        pull_ascii_nstring(source_name,sizeof(source_name),dgram->source_name.name);
@@ -244,8 +238,7 @@ void process_workgroup_announce(struct subnet_record *subrec, struct packet_stru
        subrec->work_changed = True;
 
 done:
-
-       END_PROFILE(workgroup_announce);
+       return;
 }
 
 /*******************************************************************
@@ -257,15 +250,13 @@ void process_local_master_announce(struct subnet_record *subrec, struct packet_s
        struct dgram_packet *dgram = &p->packet.dgram;
        int ttl = IVAL(buf,1)/1000;
        unstring server_name;
-       uint32 servertype = IVAL(buf,23);
+       uint32_t servertype = IVAL(buf,23);
        fstring comment;
        unstring work_name;
        struct work_record *work = NULL;
        struct server_record *servrec;
        unstring source_name;
 
-       START_PROFILE(local_master_announce);
-
        pull_ascii_nstring(server_name,sizeof(server_name),buf+5);
        pull_ascii_fstring(comment, buf+31);
        pull_ascii_nstring(source_name, sizeof(source_name), dgram->source_name.name);
@@ -355,8 +346,7 @@ a local master browser for workgroup %s and we think we are master. Forcing elec
 
        subrec->work_changed = True;
 done:
-
-       END_PROFILE(local_master_announce);
+       return;
 }
 
 /*******************************************************************
@@ -373,8 +363,6 @@ void process_master_browser_announce(struct subnet_record *subrec,
        struct work_record *work;
        struct browse_cache_record *browrec;
 
-       START_PROFILE(master_browser_announce);
-
        pull_ascii_nstring(local_master_name,sizeof(local_master_name),buf);
   
        DEBUG(3,("process_master_browser_announce: Local master announce from %s IP %s.\n",
@@ -410,8 +398,7 @@ master - ignoring master announce.\n"));
        }
 
 done:
-
-       END_PROFILE(master_browser_announce);
+       return;
 }
 
 /*******************************************************************
@@ -421,7 +408,7 @@ done:
 void process_lm_host_announce(struct subnet_record *subrec, struct packet_struct *p, const char *buf, int len)
 {
        struct dgram_packet *dgram = &p->packet.dgram;
-       uint32 servertype = IVAL(buf,1);
+       uint32_t servertype = IVAL(buf,1);
        int osmajor=CVAL(buf,5);           /* major version of node software */
        int osminor=CVAL(buf,6);           /* minor version of node software */
        int ttl = SVAL(buf,7);
@@ -433,7 +420,6 @@ void process_lm_host_announce(struct subnet_record *subrec, struct packet_struct
        fstring comment;
        char *s = get_safe_str_ptr(buf,len,discard_const_p(char, buf),9);
 
-       START_PROFILE(lm_host_announce);
        if (!s) {
                goto done;
        }
@@ -529,8 +515,7 @@ originate from OS/2 Warp client. Ignoring packet.\n"));
        found_lm_clients = True;
 
 done:
-
-       END_PROFILE(lm_host_announce);
+       return;
 }
 
 /****************************************************************************
@@ -541,7 +526,7 @@ static void send_backup_list_response(struct subnet_record *subrec,
                                      struct work_record *work,
                                      struct nmb_name *send_to_name,
                                      unsigned char max_number_requested,
-                                     uint32 token, struct in_addr sendto_ip,
+                                     uint32_t token, struct in_addr sendto_ip,
                                      int port)
 {
        char outbuf[1024];
@@ -649,12 +634,11 @@ void process_get_backup_list_request(struct subnet_record *subrec,
        struct dgram_packet *dgram = &p->packet.dgram;
        struct work_record *work;
        unsigned char max_number_requested = CVAL(buf,0);
-       uint32 token = IVAL(buf,1); /* Sender's key index for the workgroup. */
+       uint32_t token = IVAL(buf,1); /* Sender's key index for the workgroup. */
        int name_type = dgram->dest_name.name_type;
        unstring workgroup_name;
        struct subnet_record *search_subrec = subrec;
 
-       START_PROFILE(get_backup_list);
        pull_ascii_nstring(workgroup_name, sizeof(workgroup_name), dgram->dest_name.name);
 
        DEBUG(3,("process_get_backup_list_request: request from %s IP %s to %s.\n",
@@ -712,8 +696,7 @@ and I am not a local master browser.\n", workgroup_name));
                        max_number_requested, token, p->ip, p->port);
 
 done:
-
-       END_PROFILE(get_backup_list);
+       return;
 }
 
 /*******************************************************************
@@ -733,8 +716,6 @@ void process_reset_browser(struct subnet_record *subrec,
        int state = CVAL(buf,0);
        struct subnet_record *sr;
 
-       START_PROFILE(reset_browser);
-
        DEBUG(1,("process_reset_browser: received diagnostic browser reset \
 request from %s IP %s state=0x%X\n",
                nmb_namestr(&dgram->source_name), inet_ntoa(p->ip), state));
@@ -767,8 +748,6 @@ request from %s IP %s state=0x%X\n",
        /* Request to stop browsing altogether. */
        if (state & 0x4)
                DEBUG(1,("process_reset_browser: ignoring request to stop being a browser.\n"));
-
-       END_PROFILE(reset_browser);
 }
 
 /*******************************************************************
@@ -785,8 +764,6 @@ void process_announce_request(struct subnet_record *subrec, struct packet_struct
        struct work_record *work;
        unstring workgroup_name;
  
-       START_PROFILE(announce_request);
-
        pull_ascii_nstring(workgroup_name, sizeof(workgroup_name), dgram->dest_name.name);
        DEBUG(3,("process_announce_request: Announce request from %s IP %s to %s.\n",
                nmb_namestr(&dgram->source_name), inet_ntoa(p->ip),
@@ -807,8 +784,7 @@ void process_announce_request(struct subnet_record *subrec, struct packet_struct
 
        work->needannounce = True;
 done:
-
-       END_PROFILE(announce_request);
+       return;
 }
 
 /*******************************************************************
@@ -825,8 +801,6 @@ void process_lm_announce_request(struct subnet_record *subrec, struct packet_str
        struct dgram_packet *dgram = &p->packet.dgram;
        unstring workgroup_name;
 
-       START_PROFILE(lm_announce_request);
-
        pull_ascii_nstring(workgroup_name, sizeof(workgroup_name), dgram->dest_name.name);
        DEBUG(3,("process_lm_announce_request: Announce request from %s IP %s to %s.\n",
                nmb_namestr(&dgram->source_name), inet_ntoa(p->ip),
@@ -848,6 +822,5 @@ void process_lm_announce_request(struct subnet_record *subrec, struct packet_str
        found_lm_clients = True;
 
 done:
-
-       END_PROFILE(lm_announce_request);
+       return;
 }