Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
7beacb49
Commit
7beacb49
authored
16 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Created smb_freehashes() for modules outside of smblib (e.g. other DLLs) to
free the results of smb_msghashes().
parent
cb489516
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/smblib/smbhash.c
+8
-1
8 additions, 1 deletion
src/smblib/smbhash.c
src/smblib/smblib.h
+1
-0
1 addition, 0 deletions
src/smblib/smblib.h
with
9 additions
and
1 deletion
src/smblib/smbhash.c
+
8
−
1
View file @
7beacb49
...
...
@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 200
8
Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 200
9
Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public License *
...
...
@@ -267,6 +267,13 @@ hash_t** SMBCALL smb_msghashes(smbmsg_t* msg, const uchar* body)
return
(
hashes
);
}
void
SMBCALL
smb_freehashes
(
hash_t
**
hashes
)
{
size_t
n
;
FREE_LIST
(
hashes
,
n
);
}
/* Calculates and stores the hashes for a single message */
int
SMBCALL
smb_hashmsg
(
smb_t
*
smb
,
smbmsg_t
*
msg
,
const
uchar
*
text
,
BOOL
update
)
{
...
...
This diff is collapsed.
Click to expand it.
src/smblib/smblib.h
+
1
−
0
View file @
7beacb49
...
...
@@ -186,6 +186,7 @@ SMBEXPORT hash_t** SMBCALL smb_msghashes(smbmsg_t* msg, const uchar* text);
SMBEXPORT
int
SMBCALL
smb_addhashes
(
smb_t
*
smb
,
hash_t
**
hash_list
,
BOOL
skip_marked
);
SMBEXPORT
uint16_t
SMBCALL
smb_name_crc
(
const
char
*
name
);
SMBEXPORT
uint16_t
SMBCALL
smb_subject_crc
(
const
char
*
subj
);
SMBEXPORT
void
SMBCALL
smb_freehashes
(
hash_t
**
);
/* Fast look-up functions (using hashes) */
SMBEXPORT
int
SMBCALL
smb_getmsgidx_by_hash
(
smb_t
*
smb
,
smbmsg_t
*
msg
,
unsigned
source
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment