Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

option --provider-name doesn't work without additional args to the output address #2

Closed
YAtOff opened this issue May 29, 2012 · 3 comments

Comments

@YAtOff
Copy link

YAtOff commented May 29, 2012

if we write output address in the form ip:port (without @interface or /option/option ...),
despite we have provided --provider-name sth. on the command line,
the program reaches dvblast.c:196

if ( psz_string == NULL || !*psz_string ) goto end;

and the function config_ParseHost returns, without setting p_config->psz_service_provider.
As a result the provider name isn't changed.

That must happen on dvblast.c:262:

if ( !p_config->psz_service_provider && psz_provider_name )
    p_config->psz_service_provider = strdup( psz_provider_name );

where psz_provider_name is the command line argument.

@gfto
Copy link
Owner

gfto commented May 29, 2012

Around 05/29/2012 12:48 PM, YAtOff scribbled:

if we write output address in the form ip:port (without @interface or /option/option ...),
despite we have provided --provider-name sth. on the command line,
the program reaches dvblast.c:196

if ( psz_string == NULL || !*psz_string ) goto end;

and the function config_ParseHost returns, without setting p_config->psz_service_provider.
As a result the provider name isn't changed.

That must happen on dvblast.c:262:

if ( !p_config->psz_service_provider && psz_provider_name )
    p_config->psz_service_provider = strdup( psz_provider_name );

where psz_provider_name is the command line argument.

I don't get it, what does provider name have to do with the interface?

Georgi Chorbadzhiyski
http://georgi.unixsol.org/

@YAtOff
Copy link
Author

YAtOff commented May 29, 2012

if you write in the config file like this:
239.1.1.1:1111 1 1111

and run: dvblast --provider-name SomeProvider ....

the provider name won't be changed to SomeProvider.

That's because the program reaches:

if ( psz_string == NULL || !*psz_string ) goto end;

and never reaches:

if ( !p_config->psz_service_provider && psz_provider_name )
p_config->psz_service_provider = strdup( psz_provider_name );

But if you add an option to the address:
239.1.1.1:1111/udp 1 1111

and run with the some arguments, it works.

@gfto
Copy link
Owner

gfto commented May 29, 2012

Around 05/29/2012 01:11 PM, YAtOff scribbled:

if you write in the config file like this:
239.1.1.1:1111 1 1111

and run: dvblast --provider-name SomeProvider ....

the provider name won't be changed to SomeProvider.

That's because the program reaches:

if ( psz_string == NULL || !*psz_string ) goto end;

and never reaches:

if ( !p_config->psz_service_provider && psz_provider_name )
p_config->psz_service_provider = strdup( psz_provider_name );

But if you add an option to the address:
239.1.1.1:1111/udp 1 1111

and run with the some arguments, it works.

You must set the protocol after the address like you discovered.
I'll look into it but not setting the address I think is not supported at all.

Georgi Chorbadzhiyski
http://georgi.unixsol.org/

@gfto gfto closed this as completed Jan 23, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants