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

Problem in subscribing the event notification #173

Closed
jkcreddy opened this issue Mar 17, 2016 · 2 comments
Closed

Problem in subscribing the event notification #173

jkcreddy opened this issue Mar 17, 2016 · 2 comments

Comments

@jkcreddy
Copy link

Hi
I am using netopeer server to access libnetconf. From client i tried to subscribe to an event and sent to server through rpc as the following.

rpc = nc_rpc_get(filter);
nc_session_send_recv(session, rpc, &reply)

upto here it is working fine

rpc = nc_rpc_subscribe(NULL,NULL,NULL,NULL);
nc_session_send_recv(session, rpc, &rply)

After this system is being crashed with following info

netopeer-server[3914]: Received message (session 12): <?xml version="1.0" encoding="UTF-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2">
  <create-subscription xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0"/>
</rpc>

Program received signal SIGSEGV, Segmentation fault.

[Switching to Thread 0x7fffebfff700 (LWP 3940)]
__GI___pthread_mutex_lock (mutex=0x0) at ../nptl/pthread_mutex_lock.c:66
66  ../nptl/pthread_mutex_lock.c: No such file or directory.
(gdb) bt
#0  __GI___pthread_mutex_lock (mutex=0x0) at ../nptl/pthread_mutex_lock.c:66
#1  0x00007ffff76c6044 in ncntf_subscription_check () from /usr/local/lib/libnetconf.so.0
#2  0x0000000000408bc6 in np_ssh_client_netconf_rpc ()
#3  0x00000000004043d2 in client_main_thread ()
#4  0x00007ffff7126182 in start_thread (arg=0x7fffebfff700) at pthread_create.c:312
#5  0x00007ffff6e5300d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
(gdb) 
  1. How can it be solved (or do i miss anything while calling above api's).

Please help

@michalvasko
Copy link
Member

Hi,
it should definitely not crash and we will look into it, but did you initialize libnetconf with notifications? If not, that would likely fix it.

Regards,
Michal

@jkcreddy
Copy link
Author

Hi michalvasko

Thanks for your immediate reply!!!!
I found that initialization of notification is missing(due to slight code change in internal.c file).
Now it is working fine:)
Thanks once again.

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