From da90e76121efbd08773b4cf99311b53d538029bf Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Tue, 21 Feb 2017 10:49:19 -0500 Subject: [PATCH] 2017-02-21 Fred Gleason * Renamed the 'CustomerID' parameter in 'rlm/rlm_tagstation.c' to 'ClientID'. --- ChangeLog | 3 +++ conf/rlm_tagstation.conf | 8 ++++---- rlm/rlm_tagstation.c | 20 ++++++++++---------- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4b087653..1b2e7db6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15590,3 +15590,6 @@ of voice track carts was not having whitespace trimmed properly. 2017-02-21 Fred Gleason * Fixed a typo in 'conf/rlm_tagstation.conf'. +2017-02-21 Fred Gleason + * Renamed the 'CustomerID' parameter in 'rlm/rlm_tagstation.c' to + 'ClientID'. diff --git a/conf/rlm_tagstation.conf b/conf/rlm_tagstation.conf index c7265974..9486afd1 100644 --- a/conf/rlm_tagstation.conf +++ b/conf/rlm_tagstation.conf @@ -18,10 +18,10 @@ ; 'TagStation1' and working up consecutively [TagStation1] -; Customer ID +; Client ID ; -; The Customer ID of the TagStation account to which to send updates. -CustomerId=some_customer +; The Client ID of the TagStation account to which to send updates. +ClientId=some_client ; Password ; @@ -82,7 +82,7 @@ Aux2Log=Yes ; Additional TagStation instances can be configured by adding new sections... ;[TagStation2] -;CustomerId=another_customer +;ClientId=another_customer ;Password=letmein ;TitleString=%t ;ArtistString=%a diff --git a/rlm/rlm_tagstation.c b/rlm/rlm_tagstation.c index 11f87b23..16eff330 100644 --- a/rlm/rlm_tagstation.c +++ b/rlm/rlm_tagstation.c @@ -33,7 +33,7 @@ #include int rlm_tagstation_devs; -char *rlm_tagstation_customerids; +char *rlm_tagstation_clientids; char *rlm_tagstation_passwords; char *rlm_tagstation_titles; char *rlm_tagstation_artists; @@ -118,7 +118,7 @@ void rlm_tagstation_RLMStart(void *ptr,const char *arg) int i=1; rlm_tagstation_devs=0; - rlm_tagstation_customerids=NULL; + rlm_tagstation_clientids=NULL; rlm_tagstation_passwords=NULL; rlm_tagstation_titles=NULL; rlm_tagstation_artists=NULL; @@ -131,16 +131,16 @@ void rlm_tagstation_RLMStart(void *ptr,const char *arg) rlm_tagstation_aux2s=NULL; sprintf(section,"TagStation%d",i++); - strncpy(username,RLMGetStringValue(ptr,arg,section,"CustomerId",""),255); + strncpy(username,RLMGetStringValue(ptr,arg,section,"ClientId",""),255); username[255]=0; if(strlen(username)==0) { RLMLog(ptr,LOG_WARNING,"rlm_tagstation: no tagstation instances specified"); return; } while(strlen(username)>0) { - rlm_tagstation_customerids=realloc(rlm_tagstation_customerids, + rlm_tagstation_clientids=realloc(rlm_tagstation_clientids, (rlm_tagstation_devs+1)*(rlm_tagstation_devs+1)*256); - strcpy(rlm_tagstation_customerids+256*rlm_tagstation_devs,username); + strcpy(rlm_tagstation_clientids+256*rlm_tagstation_devs,username); rlm_tagstation_passwords=realloc(rlm_tagstation_passwords, (rlm_tagstation_devs+1)*(rlm_tagstation_devs+1)*256); @@ -184,8 +184,8 @@ void rlm_tagstation_RLMStart(void *ptr,const char *arg) rlm_tagstation_aux2s[rlm_tagstation_devs]= rlm_tagstation_GetLogStatus(ptr,arg,section,"Aux2Log"); sprintf(errtext, - "rlm_tagstation: configured TagStation instance for Customer ID \"%s\"", - rlm_tagstation_customerids+256*rlm_tagstation_devs); + "rlm_tagstation: configured TagStation instance for Client ID \"%s\"", + rlm_tagstation_clientids+256*rlm_tagstation_devs); rlm_tagstation_devs++; RLMLog(ptr,LOG_INFO,errtext); sprintf(section,"TagStation%d",i++); @@ -197,7 +197,7 @@ void rlm_tagstation_RLMStart(void *ptr,const char *arg) void rlm_tagstation_RLMFree(void *ptr) { - free(rlm_tagstation_customerids); + free(rlm_tagstation_clientids); free(rlm_tagstation_passwords); free(rlm_tagstation_titles); free(rlm_tagstation_artists); @@ -239,7 +239,7 @@ void rlm_tagstation_RLMPadDataSent(void *ptr,const struct rlm_svc *svc, } if((flag==1)||((flag==2)&&(log->log_onair!=0))) { snprintf(fmt,1024,"https://tsl.tagstation.com/tsl.ashx?CID=%s&Title=%s&Artist=%s&Album=%s&EventCategory=%s&EventID=%%n&Duration=%%h&LookAhead=False", - rlm_tagstation_customerids+256*i, + rlm_tagstation_clientids+256*i, rlm_tagstation_titles+256*i, rlm_tagstation_artists+256*i, rlm_tagstation_albums+256*i, @@ -247,7 +247,7 @@ void rlm_tagstation_RLMPadDataSent(void *ptr,const struct rlm_svc *svc, strncpy(url,RLMResolveNowNextEncoded(ptr,now,next,fmt,RLM_ENCODE_URL), 4096); - snprintf(account,1024,"%s:%s",rlm_tagstation_customerids+256*i, + snprintf(account,1024,"%s:%s",rlm_tagstation_clientids+256*i, rlm_tagstation_passwords+256*i); if(strlen(now->rlm_title)!=0) { if(fork()==0) {