Hi!

I am having some troubles with sending messages and getting nua_r_message
nofications back. Thread one is executing the su_root_run function. Thread
two gets the sip address and the text of the user, creates an object, puts
the object in a mutex protected vector, invokes nua_message and releases the
mutex again.

The main idea is to have messages first in a pending queue and remove them
as soon as the delivery by nua_r_message is confirmed. If there are
several messages waiting in the pending queue and thread two tries to
resend them after a certain time, all messages are received by the
peer stack but only zero or one nua_r_message event gets to the first
thread.

Trying to put the problem into a simple environment by altering:

void ssc_message(ssc_t *ssc, char *destination)
{
  ssc_oper_t *op1;
  ssc_oper_t *op2;
  op1 = ssc_oper_create(ssc, SIP_METHOD_MESSAGE, destination,
                                   TAG_END());

  op2 = ssc_oper_create(ssc, SIP_METHOD_MESSAGE, destination,
                                   TAG_END());

  if (op1 && op2) {
    char msg[160];
    printf("%s: sending message to %s\n", ssc->ssc_name, op1->op_ident);

    ssc_input_set_prompt("Enter message> ");
    ssc_input_read_string(msg, sizeof(msg));

    nua_message(op1->op_handle,
                SIPTAG_CONTENT_TYPE_STR("text/plain"),
                SIPTAG_PAYLOAD_STR(msg),
                TAG_END());

    nua_message(op2->op_handle,
                SIPTAG_CONTENT_TYPE_STR("text/plain"),
                SIPTAG_PAYLOAD_STR(msg),
                TAG_END());

  }
}

in the sofsip-cli-0.11 client (1.12.3) issues the following:


sofsip> m 192.168.1.65:5062
In the signal handler...11.
UA: sending message to


Any suggested workaround would be appreciated!
Best regards

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sofia-sip-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to