<div>Hi all,</div>
<div> </div>
<div>First let me explain my program and later will tell about the issue i am facing with dbus.</div>
<div>******This is the function on the client side which is being called from process A for 10000 times from 10 different threads ***********</div>
<div>static void TestfunctA(ELAPSED_TIME_STATS *et)<br>{</div>
<div> </div>
<div> int i;<br> printf("\n\nstarting %s.\n", __FUNCTION__);</div>
<div> InitElapsedTimeSet("VZPAL_GetVideoInputStatusInfo", et); //initializing the time_spec struct<br> for (i=1; i<=LoopCount; i++)<br> {<br> StartElapsedTimeMeasurement(et);// making note of the start time <br>
Result = function1(10, &variable);<br> StopElapsedTimeMeasurement(et);//making note of the end time</div>
<div> }<br> DumpLatencyTimeSet(et);<br> DumpElapsedTimeSet(et);<br>}</div>
<div> </div>
<div>************ client glue file which actally calls the original fucntion on the process B which is the server *****************</div>
<div>eVZPAL_ReturnCode function1 (</div>
<div> int n,<br> int array[512]) // input array, will have to be passed as Glib variant<br>{<br> <br> GError *error = NULL;<br> GVariant *gvarray;<br>
gconstpointer structFromGV;<br> gsize dataSize;</div>
<div> // call the sync version of the method,<br> com_our_api_call_function1_sync (proxy,<br> n, &gvarray, (gint*)&nResult,<br> NULL, &error);<br>
if (error != NULL)<br> {<br> g_print("Error in %s, msg=\"%s\".\n", __FUNCTION__, error->message);<br> g_object_unref(error);<br> }</div>
<div> structFromGV = g_variant_get_fixed_array(gvarray, &dataSize, sizeof (guchar));<br> memcpy(array, structFromGV, sizeof(array));</div>
<div> g_variant_unref(gvarray);<br> return nResult;<br>}</div>
<div> </div>
<div> </div>
<div>***********************This is the code for the Server side glue code which runs on the process B***********************</div>
<div>in bus acquired function i registered the function1 with the respective signal handler..</div>
<div>g_signal_connect(interface, "handle-get-function1", G_CALLBACK(Do_function1), NULL);<br></div>
<div> </div>
<div>static gboolean Do_function1(<br> ComlOurApi *interface,<br> GDBusMethodInvocation *invocation,<br> guint16 n,<br> int *InputStatus,<br> gpointer user_data)<br>
{<br> GVariant *gvarray;<br> int array[512]; // input struct, will have to be passed as Glib variant</div>
<div> // get the data from VZPALe.<br> nResult = function1(n, &array);</div>
<div> gv = g_variant_new_from_data(((const GVariantType *) "ay"), &array,<br> sizeof(array),<br> TRUE, NULL, NULL);</div>
<div> // send the results back to the client process<br> coml_our_api_complete_function1 (interface, invocation,<br> gvarray, (guint16) nResult);</div>
<div> // a little test to see if main loop calls these functions<br> //volatile pid_t callbackPid = getpid();<br> //g_print("\n mainloop pid is %x, callback pid is %x.\n", mainLoopPid, callbackPid);</div>
<div> g_variant_unref(gvarray);<br> (void) user_data; // </div>
<div> return TRUE; // to indicate that we handled</div>
<div>}<br></div>
<div>This inturn calls a original function....</div>
<div> </div>
<div>My issue is this program works perfectly fine... no errors but when i run this client for 10000 run in 10 different threads ( i am calling the same API) </div>
<div>I am gett</div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div><br><br> </div>
<div> </div>