Skip to content
Snippets Groups Projects
Commit 4633008e authored by rswindell's avatar rswindell
Browse files

ftn_msgid and get_msgid generate a new message ID if the existing ID is blank.

ftn_msgid returns the first serialno field as lowercase hex.
parent 1dca2b16
No related branches found
No related tags found
No related merge requests found
...@@ -342,11 +342,11 @@ char* DLLCALL ftn_msgid(sub_t *sub, smbmsg_t* msg) ...@@ -342,11 +342,11 @@ char* DLLCALL ftn_msgid(sub_t *sub, smbmsg_t* msg)
{ {
static char msgid[256]; static char msgid[256];
if(msg->ftn_msgid!=NULL) if(msg->ftn_msgid!=NULL && *msg->ftn_msgid!=0)
return(msg->ftn_msgid); return(msg->ftn_msgid);
snprintf(msgid,sizeof(msgid) snprintf(msgid,sizeof(msgid)
,"%s %08lX %lu.%s %08lX\r" ,"%s %08lx %lu.%s %08lX\r"
,faddrtoa(&sub->faddr,NULL) ,faddrtoa(&sub->faddr,NULL)
,msgid_serialno(msg) ,msgid_serialno(msg)
,msg->idx.number ,msg->idx.number
...@@ -364,7 +364,7 @@ char* DLLCALL get_msgid(scfg_t* cfg, uint subnum, smbmsg_t* msg) ...@@ -364,7 +364,7 @@ char* DLLCALL get_msgid(scfg_t* cfg, uint subnum, smbmsg_t* msg)
{ {
static char msgid[256]; static char msgid[256];
if(msg->id!=NULL) if(msg->id!=NULL && *msg->id!=0)
return(msg->id); return(msg->id);
if(subnum>=cfg->total_subs) if(subnum>=cfg->total_subs)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment