Re: [Sofia-sip-devel] Running the sofia-sip event loop in a thread context

2008-09-08 Thread Stefano Sabatini
On date Friday 2008-09-05 12:10:10 +0200, Stefano Sabatini wrote:
> On 9/5/08, Stefano Sabatini <[EMAIL PROTECTED]> wrote:
> > Hi all,
> >
> > I have a multithreaded application, and I need to run the sofia-sip
> > event loop not in the main process context, but in the context of a
> > thread.
> >
> > I implemented it this way.
> > I implemented a method Run() which instantiates the thread instance
> > and makes it execute su_root_run(),  and a Stop() method which
> > executes su_root_break() and wait for the thread termination.
> >
> > Unfortunately this apporach seems not to work, as I get this message
> > from the sofia stack:
> > nua(0x8729740): signal r_invite
> > SIPEngineTest: su_base_port.c:322: su_base_port_run: Assertion
> > `su_port_own_thread(self)' failed.
> >
> > and the process gets terminated by the SIGABRT signal.
> >
> > I'm currently stuck with it, can someone help/provide some hint?
> 
> Do I need to use the interface defined in su_wait.h?
> I was using the functions provided in another library for managing threading.

Well I read the documentation for su_wait.h but I stll can't figure
out how to use it.

Since there is no way to create explicitly a thread, I think the
nearest think to the thread concept is the task, then I can't see any
reference to mutexes so I have no idea about how synchronization may
work here (mmh well should I use messages for that?).

Please can someone suggest just a simple way to use the sofia API to
create and run a thread?

Regards.

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Running the sofia-sip event loop in a thread context

2008-09-08 Thread Stefano Sabatini
On date Monday 2008-09-08 10:08:39 +0200, Stefano Sabatini wrote:
> On date Friday 2008-09-05 12:10:10 +0200, Stefano Sabatini wrote:
> > On 9/5/08, Stefano Sabatini <[EMAIL PROTECTED]> wrote:
> > > Hi all,
> > >
> > > I have a multithreaded application, and I need to run the sofia-sip
> > > event loop not in the main process context, but in the context of a
> > > thread.
> > >
> > > I implemented it this way.
> > > I implemented a method Run() which instantiates the thread instance
> > > and makes it execute su_root_run(),  and a Stop() method which
> > > executes su_root_break() and wait for the thread termination.
> > >
> > > Unfortunately this approach seems not to work, as I get this message
> > > from the sofia stack:
> > > nua(0x8729740): signal r_invite
> > > SIPEngineTest: su_base_port.c:322: su_base_port_run: Assertion
> > > `su_port_own_thread(self)' failed.
> > >
> > > and the process gets terminated by the SIGABRT signal.
> > >
> > > I'm currently stuck with it, can someone help/provide some hint?
> > 
> > Do I need to use the interface defined in su_wait.h?
> > I was using the functions provided in another library for managing 
> > threading.
> 
> Well I read the documentation for su_wait.h but I stll can't figure
> out how to use it.
> 
> Since there is no way to create explicitly a thread, I think the
> nearest think to the thread concept is the task, then I can't see any
> reference to mutexes so I have no idea about how synchronization may
> work here (mmh well should I use messages for that?).
> 
> Please can someone suggest just a simple way to use the sofia API to
> create and run a thread?

Here it is my first attempt at sofia threading:

--8<-
#include 
#include 
#include 
#include 

/* this defines the kind of magic to pass to the handler, contains the 
application context */
#define SU_ROOT_MAGIC_T void

#include 
#include 

int countdown_init(su_root_t* root, su_root_magic_t* magic)
{
int i;
printf("click clack click clack...\n");
for (i=10; i > 0; i--) {
sleep(1);
printf("%d...\n", i);
}
return 0;
}

void countdown_deinit(su_root_t* root, su_root_magic_t* magic)
{
printf("BOOM...\n");
}

int main (int argc, char *argv[])
{
su_root_t *root;

/* Initialize Sofia-SIP library and create event loop */
su_init();

root = su_root_create(NULL); /* create a root object, don't pass to it any 
context */

/* enable threading, now su_clone_start will start a new thread */
if (!su_root_threading(root, 1)) {
fprintf(stderr, "Failed to activate threading\n");
exit(1);
}

su_clone_r clone;
/* this is blocking */
su_clone_start(root,
   clone,
   NULL,
   &countdown_init,
   &countdown_deinit);

printf("main process thread...\n");

/* Destroy allocated resources */
su_root_destroy(root);
su_deinit();

exit(0);
}
--8<-

And this is the output:
click clack click clack...
10...
9...
8...
7...
6...
5...
4...
3...
2...
1...
main process thread...

In this case the call to the countdown_init function is blocking,
furthermore the countdown_deinit function is not called at all.

What (possbily silly) am I missing?

TIA, regards.

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Running the sofia-sip event loop in a thread context

2008-09-08 Thread Rémi BUISSON
Hi,

I have the same problem than you ...

I have done a python binding for my library and I have tried to run my 
initialization SIP stack function (which calls the su_root_run()) 
function in a different thread.

For allmost I read it's not possible to run any event loop in a thread 
(e. g. gtk main loop).

If you found something please help me.

Rémi

Stefano Sabatini wrote:
> On date Friday 2008-09-05 12:10:10 +0200, Stefano Sabatini wrote:
>   
>> On 9/5/08, Stefano Sabatini <[EMAIL PROTECTED]> wrote:
>> 
>>> Hi all,
>>>
>>> I have a multithreaded application, and I need to run the sofia-sip
>>> event loop not in the main process context, but in the context of a
>>> thread.
>>>
>>> I implemented it this way.
>>> I implemented a method Run() which instantiates the thread instance
>>> and makes it execute su_root_run(),  and a Stop() method which
>>> executes su_root_break() and wait for the thread termination.
>>>
>>> Unfortunately this apporach seems not to work, as I get this message
>>> from the sofia stack:
>>> nua(0x8729740): signal r_invite
>>> SIPEngineTest: su_base_port.c:322: su_base_port_run: Assertion
>>> `su_port_own_thread(self)' failed.
>>>
>>> and the process gets terminated by the SIGABRT signal.
>>>
>>> I'm currently stuck with it, can someone help/provide some hint?
>>>   
>> Do I need to use the interface defined in su_wait.h?
>> I was using the functions provided in another library for managing threading.
>> 
>
> Well I read the documentation for su_wait.h but I stll can't figure
> out how to use it.
>
> Since there is no way to create explicitly a thread, I think the
> nearest think to the thread concept is the task, then I can't see any
> reference to mutexes so I have no idea about how synchronization may
> work here (mmh well should I use messages for that?).
>
> Please can someone suggest just a simple way to use the sofia API to
> create and run a thread?
>
> Regards.
>
> -
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ___
> Sofia-sip-devel mailing list
> Sofia-sip-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
>
>   

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Running the sofia-sip event loop in a thread context

2008-09-08 Thread Stefano Sabatini
On date Monday 2008-09-08 10:31:43 +0200, Stefano Sabatini wrote:
> On date Monday 2008-09-08 10:08:39 +0200, Stefano Sabatini wrote:
> > On date Friday 2008-09-05 12:10:10 +0200, Stefano Sabatini wrote:
> > > On 9/5/08, Stefano Sabatini <[EMAIL PROTECTED]> wrote:
> > > > Hi all,
> > > >
> > > > I have a multithreaded application, and I need to run the sofia-sip
> > > > event loop not in the main process context, but in the context of a
> > > > thread.
> > > >
> > > > I implemented it this way.
> > > > I implemented a method Run() which instantiates the thread instance
> > > > and makes it execute su_root_run(),  and a Stop() method which
> > > > executes su_root_break() and wait for the thread termination.
> > > >
> > > > Unfortunately this approach seems not to work, as I get this message
> > > > from the sofia stack:
> > > > nua(0x8729740): signal r_invite
> > > > SIPEngineTest: su_base_port.c:322: su_base_port_run: Assertion
> > > > `su_port_own_thread(self)' failed.
> > > >
> > > > and the process gets terminated by the SIGABRT signal.
> > > >
> > > > I'm currently stuck with it, can someone help/provide some hint?
> > > 
> > > Do I need to use the interface defined in su_wait.h?
> > > I was using the functions provided in another library for managing 
> > > threading.
> > 
> > Well I read the documentation for su_wait.h but I stll can't figure
> > out how to use it.
> > 
> > Since there is no way to create explicitly a thread, I think the
> > nearest think to the thread concept is the task, then I can't see any
> > reference to mutexes so I have no idea about how synchronization may
> > work here (mmh well should I use messages for that?).
> > 
> > Please can someone suggest just a simple way to use the sofia API to
> > create and run a thread?
> 
> Here it is my first attempt at sofia threading:
[...]

New try using su_task_execute this time.

--8<-
#include 
#include 
#include 
#include 

/* this defines the kind of magic to pass to the handler, contains the 
application context */
#define SU_ROOT_MAGIC_T void

#include 
#include 

int task_function(void* opaque) {
int i;
printf("click clack click clack...\n");
for (i=10; i > 0; i--) {
sleep(1);
printf("%d...\n", i);
}
printf("BOOM...\n");
return 0;
}

int main (int argc, char *argv[])
{
su_root_t *root;

/* Initialize Sofia-SIP library and create event loop */
su_init();

root = su_root_create(NULL); /* create a root object, don't pass to it any 
context */

/* enable threading, now su_clone_start will start a new thread */
if (!su_root_threading(root, 1)) {
fprintf(stderr, "Failed to activate threading\n");
exit(1);
}

su_task_r task;
su_task_init(task); /* init the task */

int task_ended = 0;
if (su_task_execute(task, &task_function, NULL, &task_ended) < 0) {
fprintf(stderr, "Failed to execute the task\n");
exit(1);
}

printf("main process thread...\n");

/* how can I understand when the task thread is terminated?
 * for now it will continue forever... */
while (1)
sleep(1);

/* Destroy allocated resources */
su_root_destroy(root);

/* how to notify the main thread of the termination of the task thread? */

su_task_deinit(task);
su_deinit();


exit(0);
}
--8<-

This always crashes with this backtrace:
(gdb) r
[Thread debugging using libthread_db enabled]
[New Thread 0xb7a576b0 (LWP 24551)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7a576b0 (LWP 24551)]
0xb7ed4d84 in su_port_own_thread (self=0x0) at su_port.h:332
(gdb) bt
#0  0xb7ed4d84 in su_port_own_thread (self=0x0) at su_port.h:332
#1  0xb7ed4d20 in su_task_execute (task=0xbfd724a8, function=0x80486f4 
, arg=0x0, return_value=0xbfd724a4) at su_root.c:338
#2  0x080487ec in main () at su-thread4.c:42

Ideas?

TIA, regards (and sorry for the mails flood).

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


[Sofia-sip-devel] Binding issues (was: Can NUA resolve domain names?)

2008-09-08 Thread mikhail.zabaluev
Hi,




From: ext Diego Costantini [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 05, 2008 6:33 PM
To: Zabaluev Mikhail (Nokia-D/Helsinki)
Cc: sofia-sip-devel@lists.sourceforge.net
Subject: RE: [Sofia-sip-devel] Can NUA resolve domain names?



Now it works but I have another problem.

I am binding sofia to sip:*:5067 and apparently can receive messages 
correctly, but when I try to send one, it uses the first eth it finds, not the 
proper one from route.

E.g.:

[EMAIL PROTECTED]:~/nec/libvoip$ route -e

Kernel IP routing table

Destination Gateway Genmask Flags   MSS Window  
irtt Iface

192.168.100.0   192.168.150.11  255.255.255.0   UG0 0  
0 eth2

10.10.150.0 *   255.255.255.0   U 0 0  
0 eth1

192.168.150.0   *   255.255.255.0   U 0 0  
0 eth2

10.0.2.0*   255.255.255.0   U 0 0  
0 eth0

link-local  *   255.255.0.0 U 0 0  
0 eth1

default 10.0.2.20.0.0.0 UG0 0  
0 eth0

default 192.168.150.11  0.0.0.0 UG0 0  
0 eth2

 

when I send to 10.10.150.101, the source is 10.0.2.15, so the message 
is lost.

The correct outgoing interface should be 10.10.150.100

 

Am I missing a sofia tag to use the correct souce IP for every message, 
or it is not supported (or a bug)?

To use a non-default route, you have to bind the stack to the IP address of the 
interface you want to use.

I filed a bug 

  about it.

 

Hope this helps,

  Mikhail

 

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] sofia-sip changes (2008-09-03)

2008-09-08 Thread Della Betta Filippo
After applying this patches , I get segfault on TEST NUA-5.6: destroy when 
completed.
Stack dump following..
Can you check this ?
TIA
Regards,
Filippo


#0  su_home_mutex_lock (home=0x) at su_alloc.c:1518
#1  0xb7ec96c9 in msg_destroy (msg=0x) at msg.c:160
#2  0xb7f0898b in nua_client_request_unref (cr=0x8203788) at nua_stack.c:2217
#3  0xb7f08bcd in nua_client_request_remove (cr=0x8203788) at nua_stack.c:2167
#4  0xb7f1c963 in nua_session_usage_remove (nh=0x81f9a38, ds=0x81f9a70, 
du=0x827b418, cr0=0x0, sr0=0xb6d30f14) at nua_session.c:279
#5  0xb7f0fc47 in nua_dialog_usage_remove_at (own=0x81f9a38, ds=0x81f9a70, 
at=, cr0=0x0, sr0=0xb6d30f14) at nua_dialog.c:377
#6  0xb7f09a96 in nua_base_server_report (sr=0xb6d30f14, tags=0x0) at 
nua_stack.c:1891
#7  0xb7f2189b in nua_bye_server_report (sr=0xb6d30f14, tags=0x0) at 
nua_session.c:3850
#8  0xb7f08081 in nua_server_report (sr=0x81f9a38) at nua_stack.c:1827
#9  0xb7f0bd1a in nua_stack_process_request (nh=0x81f9a38, leg=0x8238078, 
irq=0x826b4a0, sip=0x821fe7c) at nua_stack.c:1464
#10 0xb7eff3a8 in leg_recv (leg=0x8238078, msg=0x821fde0, sip=0x821fe7c, 
tport=0x81c6d88) at nta.c:4884
#11 0xb7f0060b in agent_recv_request (agent=0x81c5930, msg=0x821fde0, 
sip=0x821fe7c, tport=0x81c6d88) at nta.c:2472
#12 0xb7f01555 in agent_recv_message (agent=0x81c5930, tport=0x81c6d88, 
msg=0x821fde0, tport_via=0x81c82e8, now={tv_sec = 3429853072, tv_usec = 274963})
at nta.c:2254
#13 0xb7f69414 in tport_base_deliver (self=0x81c6d88, msg=0x821fde0, 
now={tv_sec = 2863311530, tv_usec = 274963}) at tport.c:3013
#14 0xb7f75191 in tport_deliver (self=0x81c6d88, msg=0x821fde0, next=0x0, 
sc=0x0, now={tv_sec = 3429853072, tv_usec = 274963}) at tport.c:3002
#15 0xb7f75472 in tport_parse (self=0x81c6d88, complete=1, now={tv_sec = 
3429853072, tv_usec = 274963}) at tport.c:2919
#16 0xb7f755fd in tport_recv_event (self=0x81c6d88) at tport.c:2861
#17 0xb7f758e8 in tport_base_wakeup (self=0x81c6d88, events=1) at tport.c:2763
#18 0xb7f61129 in su_epoll_port_wait_events (self=0x81c41f0, tout=498) at 
su_epoll_port.c:506
#19 0xb7f5f077 in su_base_port_run (self=0x81c41f0) at su_base_port.c:342
#20 0xb7f56d49 in su_root_run (self=0x81c43d8) at su_port.h:310
#21 0xb7f5faba in su_pthread_port_clone_main (varg=0xbfa83014) at 
su_pthread_port.c:321
#22 0xb7e6b240 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#23 0xb7e0049e in clone () from /lib/tls/i686/cmov/libc.so.6



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sofia-SIP Darcs 
Changes
Sent: mercoledì 3 settembre 2008 20.56
To: sofia-sip-devel@lists.sourceforge.net
Subject: [Sofia-sip-devel] sofia-sip changes (2008-09-03)

This posting was generated automatically from darcs repo
.

Wed Sep  3 21:21:06 EEST 2008  Pekka Pessi <[EMAIL PROTECTED]>
  * nua: using nua_client_set_terminating()

M ./libsofia-sip-ua/nua/nua_dialog.h -2 +2
M ./libsofia-sip-ua/nua/nua_notifier.c -2 +2
M ./libsofia-sip-ua/nua/nua_publish.c -1 +1
M ./libsofia-sip-ua/nua/nua_register.c -3 +3
M ./libsofia-sip-ua/nua/nua_stack.c -3 +3
M ./libsofia-sip-ua/nua/nua_subnotref.c -3 +3

Wed Sep  3 21:20:29 EEST 2008  Pekka Pessi <[EMAIL PROTECTED]>
  * nua: added reference counting for client-side transactions

M ./libsofia-sip-ua/nua/nua_dialog.c -17 +10
M ./libsofia-sip-ua/nua/nua_dialog.h -5 +21
M ./libsofia-sip-ua/nua/nua_session.c -11 +20
M ./libsofia-sip-ua/nua/nua_stack.c -62 +172

Wed Sep  3 20:55:22 EEST 2008  Pekka Pessi <[EMAIL PROTECTED]>
  * nua: using HAVE_MEMLEAK_LOG

  Logging nua_handle_ref() and nua_handle_unref().

M ./libsofia-sip-ua/nua/nua_common.c -2 +43
M ./libsofia-sip-ua/nua/nua_stack.h -31 +14

Wed Sep  3 20:50:17 EEST 2008  Pekka Pessi <[EMAIL PROTECTED]>
  * nua_tag.c: updated documentation on NUA tags

M ./libsofia-sip-ua/nua/nua_tag.c -195 +201

Wed Sep  3 20:49:53 EEST 2008  Pekka Pessi <[EMAIL PROTECTED]>
  * outbound.c: do not use OPTIONS keepalive by default but on UDP

  On TCP, use TCP-level keepalives.

M ./libsofia-sip-ua/nua/outbound.c -4 +10

Wed Sep  3 20:11:43 EEST 2008  Pekka Pessi <[EMAIL PROTECTED]>
  * configure.ac: added --enable-memleag-log and HAVE_MEMLEAK_LOG

M ./configure.ac +9

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


CONFIDENTIALITY NOTICE

This message and its attachments are addressed solely

Re: [Sofia-sip-devel] Running the sofia-sip event loop in a thread context

2008-09-08 Thread Stefano Sabatini
On date Monday 2008-09-08 11:36:29 +0200, Stefano Sabatini phoned this:
> On date Monday 2008-09-08 10:31:43 +0200, Stefano Sabatini wrote:
> > On date Monday 2008-09-08 10:08:39 +0200, Stefano Sabatini wrote:
> > > On date Friday 2008-09-05 12:10:10 +0200, Stefano Sabatini wrote:
> > > > On 9/5/08, Stefano Sabatini <[EMAIL PROTECTED]> wrote:
> > > > > Hi all,
> > > > >
> > > > > I have a multithreaded application, and I need to run the sofia-sip
> > > > > event loop not in the main process context, but in the context of a
> > > > > thread.
[...]

Well this time I checked the Gmane archive and I found this:
http://thread.gmane.org/gmane.comp.telephony.sofia-sip.devel/2534/focus=2536

Quoting Pekka from it:
|You can use threads w/ Sofia in two alternative ways:
|
|1/ You create thread by your self, and call su_root_create() by
|yourself. Then call su_root_run()/su_root_step() to process su_root_t
|stuff. When you want to exit from thread, you should call
|su_root_break() (if su_root_run()ing) and then su_root_destroy().
|
|2/ You call su_clone_start() and get su_clone_t reference. A new
|thread is created. When you'd want to get rid of that thread, you call
|su_clone_wait() from the main thread.

I can't opt for solution 1, since I need to create the root in the
main thread, then run it with a Run() command.

For the solution 2: when su_clone_start() is invoked, the init
function defined is executed and the main thread waits for its
termination, then how can I specify which function should execute the
new thread?

Regards.
-- 
Stefano Sabatini
http://www.reilabs.com

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] sofia-sip changes (2008-09-03)

2008-09-08 Thread Michael Jerris
We have seen some similar results from the same patch set:

(gdb) bt
#0  0x2aaab00d6f56 in nta_outgoing_destroy  
(orq=0x) at nta.c:6914
#1  0x2aaab010ca5b in nua_client_request_complete  
(cr=0x2aaab43a87a0) at nua_stack.c:2186
#2  0x2aaab0108d76 in nh_destroy (nua=0x2c009310,  
nh=0x2aaac811ae40) at nua_stack.c:968
#3  0x2aaab0108c01 in nua_stack_destroy_handle  
(nua=0x2c009310, nh=0x2aaac811ae40, tags=0x2c4272d0) at  
nua_stack.c:937
#4  0x2aaab0108232 in nua_stack_signal (nua=0x2c009310,  
msg=0x431eef80, ee=0x2c4272a8) at nua_stack.c:653
#5  0x2aaab015961a in su_base_port_execute_msgs (queue=0x0) at  
su_base_port.c:276
#6  0x2aaab0159392 in su_base_port_getmsgs (self=0x1a871a70) at  
su_base_port.c:198
#7  0x2aaab01596f4 in su_base_port_run (self=0x1a871a70) at  
su_base_port.c:331
#8  0x2aaab01625aa in su_port_run (self=0x1a871a70) at su_port.h:310
#9  0x2aaab0162582 in su_root_run (self=0x1a870140) at su_root.c:689
#10 0x2aaab016107f in su_pthread_port_clone_main (varg=0x427b1bf0)  
at su_pthread_port.c:321
#11 0x2b3fb0032307 in start_thread () from /lib64/libpthread.so.0
#12 0x0031234d1ded in clone () from /lib64/libc.so.6

On Sep 8, 2008, at 5:37 AM, Della Betta Filippo wrote:

> After applying this patches , I get segfault on TEST NUA-5.6:  
> destroy when completed.
> Stack dump following..
> Can you check this ?
> TIA
> Regards,
> Filippo
>
>
> #0  su_home_mutex_lock (home=0x) at su_alloc.c:1518
> #1  0xb7ec96c9 in msg_destroy (msg=0x) at msg.c:160
> #2  0xb7f0898b in nua_client_request_unref (cr=0x8203788) at  
> nua_stack.c:2217
> #3  0xb7f08bcd in nua_client_request_remove (cr=0x8203788) at  
> nua_stack.c:2167
> #4  0xb7f1c963 in nua_session_usage_remove (nh=0x81f9a38,  
> ds=0x81f9a70, du=0x827b418, cr0=0x0, sr0=0xb6d30f14) at  
> nua_session.c:279
> #5  0xb7f0fc47 in nua_dialog_usage_remove_at (own=0x81f9a38,  
> ds=0x81f9a70, at=, cr0=0x0, sr0=0xb6d30f14) at  
> nua_dialog.c:377
> #6  0xb7f09a96 in nua_base_server_report (sr=0xb6d30f14, tags=0x0)  
> at nua_stack.c:1891
> #7  0xb7f2189b in nua_bye_server_report (sr=0xb6d30f14, tags=0x0) at  
> nua_session.c:3850
> #8  0xb7f08081 in nua_server_report (sr=0x81f9a38) at nua_stack.c:1827
> #9  0xb7f0bd1a in nua_stack_process_request (nh=0x81f9a38,  
> leg=0x8238078, irq=0x826b4a0, sip=0x821fe7c) at nua_stack.c:1464
> #10 0xb7eff3a8 in leg_recv (leg=0x8238078, msg=0x821fde0,  
> sip=0x821fe7c, tport=0x81c6d88) at nta.c:4884
> #11 0xb7f0060b in agent_recv_request (agent=0x81c5930,  
> msg=0x821fde0, sip=0x821fe7c, tport=0x81c6d88) at nta.c:2472
> #12 0xb7f01555 in agent_recv_message (agent=0x81c5930,  
> tport=0x81c6d88, msg=0x821fde0, tport_via=0x81c82e8, now={tv_sec =  
> 3429853072, tv_usec = 274963})
>at nta.c:2254
> #13 0xb7f69414 in tport_base_deliver (self=0x81c6d88, msg=0x821fde0,  
> now={tv_sec = 2863311530, tv_usec = 274963}) at tport.c:3013
> #14 0xb7f75191 in tport_deliver (self=0x81c6d88, msg=0x821fde0,  
> next=0x0, sc=0x0, now={tv_sec = 3429853072, tv_usec = 274963}) at  
> tport.c:3002
> #15 0xb7f75472 in tport_parse (self=0x81c6d88, complete=1,  
> now={tv_sec = 3429853072, tv_usec = 274963}) at tport.c:2919
> #16 0xb7f755fd in tport_recv_event (self=0x81c6d88) at tport.c:2861
> #17 0xb7f758e8 in tport_base_wakeup (self=0x81c6d88, events=1) at  
> tport.c:2763
> #18 0xb7f61129 in su_epoll_port_wait_events (self=0x81c41f0,  
> tout=498) at su_epoll_port.c:506
> #19 0xb7f5f077 in su_base_port_run (self=0x81c41f0) at  
> su_base_port.c:342
> #20 0xb7f56d49 in su_root_run (self=0x81c43d8) at su_port.h:310
> #21 0xb7f5faba in su_pthread_port_clone_main (varg=0xbfa83014) at  
> su_pthread_port.c:321
> #22 0xb7e6b240 in start_thread () from /lib/tls/i686/cmov/ 
> libpthread.so.0
> #23 0xb7e0049e in clone () from /lib/tls/i686/cmov/libc.so.6
>
>
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> ] On Behalf Of Sofia-SIP Darcs Changes
> Sent: mercoledì 3 settembre 2008 20.56
> To: sofia-sip-devel@lists.sourceforge.net
> Subject: [Sofia-sip-devel] sofia-sip changes (2008-09-03)
>
> This posting was generated automatically from darcs repo
> .
>
> Wed Sep  3 21:21:06 EEST 2008  Pekka Pessi <[EMAIL PROTECTED]>
>  * nua: using nua_client_set_terminating()
>
>M ./libsofia-sip-ua/nua/nua_dialog.h -2 +2
>M ./libsofia-sip-ua/nua/nua_notifier.c -2 +2
>M ./libsofia-sip-ua/nua/nua_publish.c -1 +1
>M ./libsofia-sip-ua/nua/nua_register.c -3 +3
>M ./libsofia-sip-ua/nua/nua_stack.c -3 +3
>M ./libsofia-sip-ua/nua/nua_subnotref.c -3 +3
>
> Wed Sep  3 21:20:29 EEST 2008  Pekka Pessi <[EMAIL PROTECTED]>
>  * nua: added reference counting for client-side transactions
>
>M ./libsofia-sip-ua/nua/nua_dialog.c -17 +10
>M ./libsofia-sip-ua/nua/nua_dialog.h -5 +21
>M ./libsofia-sip-ua/nua/nua_session.c -11 +20
>M ./libsofia-sip-ua/nua/nua_sta

Re: [Sofia-sip-devel] Messages control

2008-09-08 Thread mikhail.zabaluev
Hi,




From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ext 
Peter McAfee
Sent: Tuesday, August 26, 2008 3:56 PM
To: sofia-sip-devel@lists.sourceforge.net
Subject: [Sofia-sip-devel] Messages control


is it possible using nua interface to send negative replys to in 
comming  sip MESSAGE  ie instant messages

Sure, just mention "MESSAGE" in the NUTAG_APPL_METHOD to your NUA stack.
You'll have to reply to all incoming messages explicitly, then.
 
Best regards,
  Mikhail
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel