diff options
author | Luke Leighton <lkcl@samba.org> | 1999-12-04 22:22:37 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-12-04 22:22:37 +0000 |
commit | 84d7cc63239ea67481f6382da58d0678a21011fb (patch) | |
tree | d856809a073d47d605a7a8871b580ef93cb14001 /source/libsmb | |
parent | 49c157eae4bb24164f0f976d1bf6cf0cfc068863 (diff) | |
download | samba-84d7cc63239ea67481f6382da58d0678a21011fb.tar.gz samba-84d7cc63239ea67481f6382da58d0678a21011fb.tar.xz samba-84d7cc63239ea67481f6382da58d0678a21011fb.zip |
argh. trying to get the nmb agent code to filter out "self" packets.
Diffstat (limited to 'source/libsmb')
-rw-r--r-- | source/libsmb/namequery.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/source/libsmb/namequery.c b/source/libsmb/namequery.c index 79fb27bd6fa..0d9cc54f213 100644 --- a/source/libsmb/namequery.c +++ b/source/libsmb/namequery.c @@ -273,20 +273,12 @@ struct in_addr *name_query(int fd,const char *name,int name_type, BOOL bcast,BOO p.timestamp = time(NULL); p.packet_type = packet_type; - GetTimeOfDay(&tval); - - if (!send_packet(&p)) - { - if (packet_type == NMB_SOCK_PACKET) close(fd); - return NULL; - } + ZERO_STRUCT(tval); while (retries >= 0) { struct timeval tval2; - retries--; - GetTimeOfDay(&tval2); if (TvalDiff(&tval,&tval2) > retry_time) { @@ -319,6 +311,8 @@ struct in_addr *name_query(int fd,const char *name,int name_type, BOOL bcast,BOO continue; } + retries--; + if (nmb2->header.opcode != 0 || nmb2->header.nm_flags.bcast || nmb2->header.rcode || |