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

Junk socket file name for the CLI commands #21

Open
sksharma1501 opened this issue May 10, 2018 · 1 comment
Open

Junk socket file name for the CLI commands #21

sksharma1501 opened this issue May 10, 2018 · 1 comment

Comments

@sksharma1501
Copy link

In file OpenBTS-UMTS.cpp, the following line returns a junk character string for opening the CLI commands socket:
struct sockaddr_un cmdSockName;
cmdSockName.sun_family = AF_UNIX;
const char* sockpath = gConfig.getStr("CLI.SocketPath").c_str();

It seems like the gConfig is not properly initialized at this point. A socket with junk name is opened in the folder from where OpenBTS-UMTS script is called. Then the CLI cannot locate this opened socket and all commands issued from OpenBTS-UMTSCLI fail with the error:

sending datagram: No such file or directory
Is the remote application running?

I fixed the socket issue by hardcoding the filename as follows:
#define DEFAULT_CMD_PATH "/var/run/OpenBTS-UMTS-command"
char sockpath[200];
sprintf(sockpath, DEFAULT_CMD_PATH);

@sherdil6
Copy link

@sksharma1501 Hi there. I am facing exact similar issue. Tried everything for many days but no success. I tried copying your code in OpenBTS-UMTS.cpp, but still getting same error.

sending datagram: No such file or directory Is the remote application running?

Can you please share the process about how this can be added or the process can be carried out.
Thank you

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