Skip to content
This repository was archived by the owner on Aug 10, 2022. It is now read-only.

autostart station by station name. - #53

Open
redspot wants to merge 3 commits into
nega0:masterfrom
redspot:master
Open

autostart station by station name.#53
redspot wants to merge 3 commits into
nega0:masterfrom
redspot:master

Conversation

@redspot

@redspot redspot commented Aug 20, 2013

Copy link
Copy Markdown

This originally came from Justin Pletcher and
#42

I'm re-submitted it since it works well with the latest build.

to use, set the station name in config file:
autostart_station = QuickMix

This originally came from Justin Pletcher and
nega0#42
@nega0

nega0 commented Aug 28, 2013

Copy link
Copy Markdown
Owner

I'm not opposed to the concept, but I'd like to see strncmp() instead of strcmp() and/or guarantees that the inputs are \0 terminated. Later, I'll look further up the code path to see if they are, but if you beat me to it that would be great.

@redspot

redspot commented Aug 28, 2013

Copy link
Copy Markdown
Author

i'll try to find time to update this next week. This weekend is DragonCon....

also, do you know the maximum length of a station name?

@nega0

nega0 commented Aug 29, 2013

Copy link
Copy Markdown
Owner

DragonCon. Nice.
Not sure. I'd have to look and see what pbf thinks it is.

@redspot

redspot commented Sep 23, 2013

Copy link
Copy Markdown
Author

im fixing this today

@redspot

redspot commented Sep 23, 2013

Copy link
Copy Markdown
Author

so, I'm not really a C programmer. my skillz are in python. I think the right way to do the strncmp is to use the max buffer length of searchStation, which came from strdup(val) in settings.c where val is char[256]. But, I think that strdup should be the entry point check on the length by being strndup(val, sizeof(val)). Perhaps settings.c should be changed to strndup(val, sizeof(val))?

@nega0 nega0 self-assigned this Mar 30, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants