AutomateFTP of screen capture

Dear Members,
I am working on a system which displays real-time images
grabbed from a line sensor. Each grabbed image is displayed on the
screen using a simple photon application developed by me. Everything
works fine till here.

There is a new feature addition to be done to the above
mentioned system. It is capturing the screen shots of the full
screen photon application and sending the captured image to a FTP
server automatically.
I am using PxWriteImage() function to save the screen-capture
in jpeg format. (Please see
http://www.qnx.com/developers/articles/article_293_1.html for more
information)
After the screen-capture file is saved to local hard disk, I want it
to transfer to another machine using FTP.
For this I have written following shell script and I invoke it through
system() command passing the filename as argument 1 ( $1 )

#!/bin/sh
USER=AjitG
PWD=ABC
LOCAL_FOLDER=/root/personal/jpeg/
SERVER=192.152.1.19
ftp -n -i $SERVER <<SCRIPT
user $USER $PWD
bin
lcd $LOCAL_FOLDER
mput $1
bye
SCRIPT


The above design works for few iterations and later the entire system
is stalled.
I have checked with FTP server machine… only few files are
transmitted.

Can you guide me what could be the possible reason for hanging of the
system?

Thanks,
Ajit

Ajit,
1… I would have checked return code of system()
2… What exactly happens when all is stalled - I would have run pidin
Yuriy





“AjitG” <ajitgh@goowy-dot-com.no-spam.invalid> wrote in message
news:f895g5$ctg$1@inn.qnx.com

Dear Members,
I am working on a system which displays real-time images
grabbed from a line sensor. Each grabbed image is displayed on the
screen using a simple photon application developed by me. Everything
works fine till here.

There is a new feature addition to be done to the above
mentioned system. It is capturing the screen shots of the full
screen photon application and sending the captured image to a FTP
server automatically.
I am using PxWriteImage() function to save the screen-capture
in jpeg format. (Please see
http://www.qnx.com/developers/articles/article_293_1.html > for more
information)
After the screen-capture file is saved to local hard disk, I want it
to transfer to another machine using FTP.
For this I have written following shell script and I invoke it through
system() command passing the filename as argument 1 ( $1 )

#!/bin/sh
USER=AjitG
PWD=ABC
LOCAL_FOLDER=/root/personal/jpeg/
SERVER=192.152.1.19
ftp -n -i $SERVER <<SCRIPT
user $USER $PWD
bin
lcd $LOCAL_FOLDER
mput $1
bye
SCRIPT


The above design works for few iterations and later the entire system
is stalled.
I have checked with FTP server machine… only few files are
transmitted.

Can you guide me what could be the possible reason for hanging of the
system?

Thanks,
Ajit