Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit bad719ee authored by rswindell's avatar rswindell

Renamed gen_msgid() to get_msgid() at it (and ftn_msgid) will return an

existing message-ID if it's already been created for this message.
parent 2a4cc555
......@@ -781,7 +781,7 @@ extern "C" {
DLLEXPORT size_t DLLCALL strip_invalid_attr(char *str);
DLLEXPORT ushort DLLCALL subject_crc(char *subj);
DLLEXPORT char * DLLCALL ftn_msgid(sub_t* sub, smbmsg_t* msg);
DLLEXPORT char * DLLCALL gen_msgid(scfg_t* cfg, uint subnum, smbmsg_t* msg);
DLLEXPORT char * DLLCALL get_msgid(scfg_t* cfg, uint subnum, smbmsg_t* msg);
/* date_str.c */
DLLEXPORT char * DLLCALL zonestr(short zone);
......
......@@ -342,6 +342,9 @@ char* DLLCALL ftn_msgid(sub_t *sub, smbmsg_t* msg)
{
static char msgid[256];
if(msg->ftn_msgid!=NULL)
return(msg->ftn_msgid);
snprintf(msgid,sizeof(msgid)
,"%s %08lX %lu.%s %08lX\r"
,faddrtoa(&sub->faddr,NULL)
......@@ -357,10 +360,13 @@ char* DLLCALL ftn_msgid(sub_t *sub, smbmsg_t* msg)
/****************************************************************************/
/* Return a general purpose (RFC-822) message-ID */
/****************************************************************************/
char* DLLCALL gen_msgid(scfg_t* cfg, uint subnum, smbmsg_t* msg)
char* DLLCALL get_msgid(scfg_t* cfg, uint subnum, smbmsg_t* msg)
{
static char msgid[256];
if(msg->id!=NULL)
return(msg->id);
if(subnum>=cfg->total_subs)
snprintf(msgid,sizeof(msgid)
,"<%08lX.%lu@%s>"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment