Append using wip_write


#1

Hi,
I have written a code to append the two buffers using wip_write at the client side.
The following is the code which I have written.
But its not appending the file at server side , its putting some junk values in to the file .
is there any other way to append the buffer …?
Kindly help to solve this prblem

case WIP_CEV_WRITE:
if(append==1){
int nwrite = wip_write( dst_data, buffer, sizeof( buffer) - offset); );// writing the first one
if( nwrite < 0) { /error/ return; }
offset += nwrite; /* Update the number of bytes sent. /
if( offset == sizeof( buffer)) { /
All of [buffer] has been sent */

	append=2;
	offset=0;
	 wip_debug( "Done with the first one...\n");

}
  }
  if(append==2){
    int nwrite = wip_write( dst_data, buffer2, sizeof( buffer) - offset[b]);// writing the second one[/b]
    if( nwrite < 0) { /*error*/ return; }
    offset += nwrite; /* Update the number of bytes sent. */
    if( offset == sizeof( buffer)) { /* All of [buffer] has been sent */
    	wip_debug( "Done with second one\n");
    	append=1;
    	offset=0;
    	wip_close( dst_data);   dst_data   = NULL;
        wip_close( dst_ftp_cx); dst_ftp_cx = NULL;


    }
	  }

#2

Hi,
There is somthing to add to the previous post.
I need to append the sencod buffer only after sending the first data buffer,

so I didnt use wm_strcat().

thanks
Ravee