nsIChannel Open() call goes into hanging state

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

nsIChannel Open() call goes into hanging state

neel5481
Hi All,

Below code is getting hanged in linux and it is in blocking state.

nsIChannel *channel;

// Now, open the IO channel to an input stream form which we'll get the data
nsIInputStream *is;
rv = channel->Open(&is);


In above code Open() call is blocked and not coming out and application is in hanging state.


Is there any idea why in  Open() call is blocked ?


Thanks in Advance.
_______________________________________________
dev-tech-xul mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xul
Reply | Threaded
Open this post in threaded view
|

Re: nsIChannel Open() call goes into hanging state

Neil-4
[hidden email] wrote:

>Is there any idea why in Open() call is blocked ?
>  
>
You didn't give any information about the channel that you were trying
to open, but in general you should always use AsyncOpen anyway.

--
Warning: May contain traces of nuts.
_______________________________________________
dev-tech-xul mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xul
Reply | Threaded
Open this post in threaded view
|

Re: nsIChannel Open() call goes into hanging state

neel5481
Hi Neil,

Thanks for your reply.

Below is the code , ios is "@mozilla.org/network/io-service;1"

        nsIChannel *channel;
        rv = ios->NewChannel(nsUri, NULL, NULL, &channel);

        // Now, open the IO channel to an input stream form which we'll get the data
        nsIInputStream *is;
        rv = channel->Open(&is);

Now we are compiling the source code of Xulrunner to debug.
Please let us know is there any other way for easy debug the Open call ?

Thanks in Advance.


On Wednesday, December 4, 2013 3:43:39 PM UTC+5:30, Neil wrote:

> [hidden email] wrote:
>
>
>
> >Is there any idea why in Open() call is blocked ?
>
> >  
>
> >
>
> You didn't give any information about the channel that you were trying
>
> to open, but in general you should always use AsyncOpen anyway.
>
>
>
> --
>
> Warning: May contain traces of nuts.
_______________________________________________
dev-tech-xul mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xul
Reply | Threaded
Open this post in threaded view
|

Re: nsIChannel Open() call goes into hanging state

Neil-4
[hidden email] wrote:

>        nsIChannel *channel;
>        rv = ios->NewChannel(nsUri, NULL, NULL, &channel);
>
>        // Now, open the IO channel to an input stream form which we'll get the data
>        nsIInputStream *is;
>        rv = channel->Open(&is);
>
OK, so what is the value of nsUri?

--
Warning: May contain traces of nuts.
_______________________________________________
dev-tech-xul mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xul
Reply | Threaded
Open this post in threaded view
|

Re: nsIChannel Open() call goes into hanging state

neel5481
In reply to this post by neel5481
Hi Neil,

Thank you very much for your reply.
It requires some library dependency and some options in .mozconf file we have to modify for the requirement.

Now xulrunner 1.9 source code compiling fine in ubuntu without any error.
but one more question. Below is my configuration file.

mk_add_options MOZ_CO_PROJECT=xulrunner
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-xul-lin-dbg
mk_add_options MOZ_MAKE_FLAGS="-s -j4"

ac_add_options --disable-tests
ac_add_options --enable-logging
ac_add_options --enable-debug
ac_add_options --disable-optimize
ac_add_options --disable-crashreporter
ac_add_options --disable-installer
ac_add_options --enable-application=xulrunner
ac_add_options --enable-jemalloc
ac_add_options --disable-gstreamer
ac_add_options --with-java-bin-path=/usr/lib/jvm/java-6-openjdk/bin
#ac_add_options --disable-ogg
#ac_add_options --disable-wave
ac_add_options --disable-javaxpcom


After successful build we have executed "install" command to install the binary.

Where it will install ? what is the location for the binary and library files which we install ?

Thanks in Advance

On Wednesday, December 4, 2013 10:55:31 AM UTC+5:30, [hidden email] wrote:

> Hi All,
>
>
>
> Below code is getting hanged in linux and it is in blocking state.
>
>
>
> nsIChannel *channel;
>
>
>
> // Now, open the IO channel to an input stream form which we'll get the data
>
> nsIInputStream *is;
>
> rv = channel->Open(&is);
>
>
>
>
>
> In above code Open() call is blocked and not coming out and application is in hanging state.
>
>
>
>
>
> Is there any idea why in  Open() call is blocked ?
>
>
>
>
>
> Thanks in Advance.
_______________________________________________
dev-tech-xul mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xul
Reply | Threaded
Open this post in threaded view
|

Re: nsIChannel Open() call goes into hanging state

neel5481
In reply to this post by neel5481
Hi Neil,

Thanks for reply. Ignore if i posted something wrong.

nsIURI contains the path for URI to be opened.

Let's say we want to open URI for authentication ( abcd.php ) then it will contain the path for abcd.php file.

Thanks in Advance.



On Wednesday, December 4, 2013 10:55:31 AM UTC+5:30, [hidden email] wrote:

> Hi All,
>
>
>
> Below code is getting hanged in linux and it is in blocking state.
>
>
>
> nsIChannel *channel;
>
>
>
> // Now, open the IO channel to an input stream form which we'll get the data
>
> nsIInputStream *is;
>
> rv = channel->Open(&is);
>
>
>
>
>
> In above code Open() call is blocked and not coming out and application is in hanging state.
>
>
>
>
>
> Is there any idea why in  Open() call is blocked ?
>
>
>
>
>
> Thanks in Advance.

_______________________________________________
dev-tech-xul mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xul
Reply | Threaded
Open this post in threaded view
|

Re: nsIChannel Open() call goes into hanging state

Neil-4
[hidden email] wrote:

>Let's say we want to open URI for authentication ( abcd.php ) then it will contain the path for abcd.php file.
>
If you mean HTTP authentication then I don't think that will work.
If you mean that you're trying to invoke a web service of some sort,
then I think the Open call will block until you get a response from the
server. (But that's about the limit of my knowledge of Open. You
probably need to ask the dev-tech-network group instead.)

--
Warning: May contain traces of nuts.
_______________________________________________
dev-tech-xul mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xul
Reply | Threaded
Open this post in threaded view
|

Re: nsIChannel Open() call goes into hanging state

neel.patel
In reply to this post by neel5481
Thanks Neil.

Yes. I will ask to mentioned group.

Thanks

On Wednesday, December 4, 2013 10:55:31 AM UTC+5:30, [hidden email] wrote:

> Hi All,
>
>
>
> Below code is getting hanged in linux and it is in blocking state.
>
>
>
> nsIChannel *channel;
>
>
>
> // Now, open the IO channel to an input stream form which we'll get the data
>
> nsIInputStream *is;
>
> rv = channel->Open(&is);
>
>
>
>
>
> In above code Open() call is blocked and not coming out and application is in hanging state.
>
>
>
>
>
> Is there any idea why in  Open() call is blocked ?
>
>
>
>
>
> Thanks in Advance.

_______________________________________________
dev-tech-xul mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xul